-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Bitcoin Core version & health check to RpcService
Make a 'getnetworkinfo' RPC call to bitcoind immediately upon startup, to check that the node is up (and throw a ConnectException to ensure that the user is presented with an appropriate warning popup otherwise). Log a warning if the node version is outside the 0.18.0 - 0.20.1 range. Additionally, call 'getbestblockhash' to check that the chain tip is not stale (> 6 hours old). As part of this, make sure the 'getblock' RPC call works correctly with verbosity < 2, by fixing JSON deserialisation of the response when the block or txs are in summary (hex string) form. (These version & health checks are almost identical to the ones done by the original btcd-cli4j library during RPC client startup.)
- Loading branch information
Showing
4 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters