dashpay / dash

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

Minor issue: dashd not fully synced gives wrong status of a masternode versus a "you aren't synced yet" error #1293

Closed taw00 closed 6 years ago

taw00 commented 7 years ago

So, I have a test masternode and a test collateralized wallet. I leave the wallet (dashd -- not dash-qt by the way in this case), off (stopped) most of the time.

During testing, I updated both the wallet and masternode code. After updating I started up the wallet and did a "dash-cli masternode list full |grep " command.

The wallet was not fully synced, and it stated "NEW_START REQUIRED" -- I ran the same command on the tMN itself, and it stated "ENABLED" .... I waited for the wallet to finish syncing and it also then said "ENABLED".

Shouldn't dashd know that it is not synced yet? And even then, why would it have this bogus state delivered with "list full"?

Anyway... this is a minor issue in the grand scheme of things since there is a lot of messaging that is easily confusing if full context is not maintained. But I felt I should file it.

nmarley commented 6 years ago

It can take ~15-20 minutes or more to fully sync, and the wallet's cache files (*.dat) files can get stale. You should be able to stop the Qt wallet, remove mncache.dat and re-start it, wait for it to sync and it should be updated again. But every time you start the Qt wallet, it will take several minutes to sync.

It doesn't just trust the listed masternodes (e.g. your "test masternode"), but it also has to get a consensus from the network. Does that help / make sense?

taw00 commented 6 years ago

It's been a long time since I have looked at this. Sounds reasonable. It would be great though if the node "knew" its state a bit more accurately. Or at least messaged a bit more refined. Closing this because. Well. It's minor.