Sjors
commented at 11:42 am on August 12, 2024:
member
The waitfornewblock is inherently racy as the tip may have changed since the last RPC call, and can even change during initial processing of this call.
Add an optional blockhash argument so the called can specify their current tip. Return immediately if our tip is different.
I’ve made it fail if LookupBlockIndex fails. This should never happen if the user got the block hash from our RPC in the first place.
See the guideline for information on the review process.
A summary of reviews will appear here.
Conflicts
Reviewers, this pull request conflicts with the following ones:
#26593 (tracing: Only prepare tracepoint arguments when actually tracing by 0xB10C)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot added the label
RPC/REST/ZMQ
on Aug 12, 2024
Sjors force-pushed
on Aug 12, 2024
Sjors force-pushed
on Aug 12, 2024
Sjors force-pushed
on Aug 12, 2024
Sjors force-pushed
on Aug 13, 2024
DrahtBot added the label
Needs rebase
on Sep 2, 2024
Sjors force-pushed
on Sep 3, 2024
DrahtBot removed the label
Needs rebase
on Sep 3, 2024
DrahtBot added the label
Needs rebase
on Sep 3, 2024
Sjors force-pushed
on Sep 4, 2024
DrahtBot removed the label
Needs rebase
on Sep 4, 2024
DrahtBot added the label
CI failed
on Sep 7, 2024
DrahtBot removed the label
CI failed
on Sep 9, 2024
DrahtBot added the label
Needs rebase
on Sep 9, 2024
Sjors force-pushed
on Sep 10, 2024
DrahtBot removed the label
Needs rebase
on Sep 10, 2024
DrahtBot added the label
CI failed
on Sep 10, 2024
DrahtBot added the label
Needs rebase
on Sep 12, 2024
refactor: rename BlockKey to BlockRef89a8f74bbb
Rename getTipHash() to getTip() and return BlockRefebb8215f23
node: Track last block that received a blockTip notification
Also signal m_tip_block_cv when StopRPC is called, for
consistency with g_best_block_cv. This is handled in
StopRPC instead of OnRPCStopped() because the latter
is deleted in a later commit.
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
7eccdaf160
Add waitTipChanged to Mining interface
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
b94b27cf05
rpc: add test for waitforblock and waitfornewblock285fe9fb51
rpc: fix waitfornewblock description
The waitforblock RPC method takes a hash argument and waits for that specific block. The waitfornewblock waits for any new block. This commit fixes the documentation.
77ec072925
rpc: recommend -rpcclienttimeout=0 for waitfor*de7c855b3a
rpc: check for negative timeout arg in waitfor*2a40ee1121
Replace RPCNotifyBlockChange with waitTipChanged()
This refactoring commit uses the newly introduced waitTipChanged mining interface method to replace the RPCNotifyBlockChange mechanism.
dca923150e
Remove unused CRPCSignals
They are no longer used for anything since RPCNotifyBlockChange was replaced with waitTipChanged() from the mining interface.
460687a09c
rpc: use waitTipChanged for longpoll
This removes the last remaining use of g_best_block by the RPC.
e3a560ca68
Remove unused g_best_block7942951e3f
rpc: add optional blockhash to waitfornewblockd1f1e5044c
Sjors force-pushed
on Sep 17, 2024
DrahtBot removed the label
Needs rebase
on Sep 17, 2024
DrahtBot removed the label
CI failed
on Sep 17, 2024
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-09-19 01:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me