Improve reliability of wait_and_check_bitcoind#9240
Conversation
Changelog-Fixed: Fixed spurious bitcoind startup failures by retrying bitcoin-cli -rpcwait checks when RPC briefly fails.
735aafe to
7daf5e2
Compare
nGoline
left a comment
There was a problem hiding this comment.
Nice fix there. I just have 2 small changes before approving.
Co-authored-by: Níckolas Goline <nickolas.goline@gmail.com>
Co-authored-by: Níckolas Goline <nickolas.goline@gmail.com>
|
Thanks, both review points are addressed. Normally I'd just fold these fixups and rebase it myself before merging, but the fork is under the btcpayserver org, and GitHub doesn't allow maintainer pushes to org-owned fork branches (the "allow edits by maintainers" flag has no effect there). So this last bit is on you. Could you tidy the history so it lands as a single commit on top of current master? Right now it has the two git rebase -i master
# keep "pick" on "Improve reliability of wait_and_check_bitcoind"
# change the two "Update plugins/bcli.c" lines to "fixup"
git push --forceThe rebase drops the merge commit for you, so you'll end with one commit on latest master. Then I'll approve and merge it. |
bitcoin-cli -rpcwaitworks probably as expected if the blocks are loading before core lightning start. But doesn't if BitcoinD isn't listening at all before Core Lightning wait, we observed the following behavior.Rather than waiting for 30 seconds, this PR wait 30 times for 1 seconds. This fix the issue for us.
This is a patch we are using in BTCPay Server deployments. Not really critical in production scenario, but it was causing our tests to fail as lightningd was taking 30 seconds to properly start.