Merge bitcoin/bitcoin#21056: rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting
pull/826/headb9e76f1bf0
rpc: Add test for -rpcwaittimeout (Christian Decker)f76cb10d7d
rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker)c490e17ef6
doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker)a7fcc8eb59
rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: https://github.com/ElementsProject/lightning/issues/4355 [comment]: https://github.com/ElementsProject/lightning/issues/4355#issuecomment-768288261 ACKs for top commit: laanwj: Code review ACKb9e76f1bf0
promag: ACKb9e76f1bf0
. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
commit
6556da77d7
@ -0,0 +1,6 @@
|
||||
New bitcoin-cli settings
|
||||
------------------------
|
||||
|
||||
- A new `-rpcwaittimeout` argument to `bitcoin-cli` sets the timeout
|
||||
in seconds to use with `-rpcwait`. If the timeout expires,
|
||||
`bitcoin-cli` will report a failure. (#21056)
|
Loading…
Reference in new issue