File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -644,3 +644,16 @@ A few guidelines for introducing and reviewing new RPC interfaces:
644644
645645 - * Rationale* : If a RPC response is not a JSON object then it is harder to avoid API breakage if
646646 new data in the response is needed.
647+
648+ - Wallet RPCs call BlockUntilSyncedToCurrentChain to maintain consistency with
649+ ` getblockchaininfo ` 's state immediately prior to the call's execution. Wallet
650+ RPCs whose behavior does * not* depend on the current chainstate may omit this
651+ call.
652+
653+ - * Rationale* : In previous versions of Bitcoin Core, the wallet was always
654+ in-sync with the chainstate (by virtue of them all being updated in the
655+ same cs_main lock). In order to maintain the behavior that wallet RPCs
656+ return results as of at least the highest best-known block an RPC
657+ client may be aware of prior to entering a wallet RPC call, we must block
658+ until the wallet is caught up to the chainstate as of the RPC call's entry.
659+ This also makes the API much easier for RPC clients to reason about.
You can’t perform that action at this time.
0 commit comments