dcrlnd icon indicating copy to clipboard operation
dcrlnd copied to clipboard

RPC doesn't start if blocks are not being generated

Open jholdstock opened this issue 5 years ago • 0 comments

Testnet had not seen a block for 5+ hours, and it caused some odd behaviour.

After unlocking the wallet, dcrlnd stopped listening on port 10009 and performed it's startup activities. It then logged the following:

2019-04-26 11:49:13.040 [INF] DCRW: Blockchain sync completed, wallet ready for general usage.

It seems like everything is ready, and at this point I would expect the RPC to be available on port 10009. However there is nothing listening on the port, and any usage of dcrlncli results in connection errors.

After speaking with @matheusd it seems that this is because dcrlnd only starts the RPC server after the wallet considers itself synced, and it won't consider itself synced if it hasn't seen a block for 2 hours. We should alter the logging so that instead of incorrectly saying the wallet is ready for usage, we inform the user that the wallet is not synced and thus the RPC is not available.

(Running commit 22a6961ec50a1a520ebecf95584ac2782497ebde)

jholdstock avatar Apr 26 '19 12:04 jholdstock