dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

How to tell a `dashd` daemon to `reindex` without updating the config file? #5485

Open coolaj86 opened 1 year ago

coolaj86 commented 1 year ago

-reindex is not a config option - putting it in the config will cause a reindex to occur every time the service is restarted, which is not desirable.

Ideally dashd should know to reindex automatically when versions change.

I'm assuming I can also just delete some files and that should cause it to reindex? What files are those?

It would also be nice if we had an RPC command that would cause a reindex.

How can I reindex without manually stopping the daemon and system launcher, running it manually, waiting for it to finish, and then manually reenabling the system launcher for the daemon?

kxcd commented 1 year ago

To reindex the dashd, ie the command dashd -index as a command line parameter, if using windows, you can edit the shortcut to include the parameter. If you made a copy of the shortcut before changing it, consider appending (reindex) to the edited shortcut, so you have two one to start normally and one to issue reindex as required.

As a sysadmin, I am not interested in having the wallet to automatically fall into a reindex routine willy nilly, I am quite happy to issue it as required, firstly, the process is extremely lengthy, often times when I have a corrupted dashcore folder, I will simply replace it with a known good version and restart, this gets me up and running in no time at all. Let's keep the user in the driver's seat and not add to the frustration of sysadmins whose job it is to keep this network running. :pray: