mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
rpc: add optional blockhash to waitfornewblock
This commit is contained in:
@@ -579,7 +579,8 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
node.reconsiderblock(rollback_hash)
|
||||
# The chain has probably already been restored by the time reconsiderblock returns,
|
||||
# but poll anyway.
|
||||
self.wait_until(lambda: node.waitfornewblock(timeout=100)['hash'] == current_hash)
|
||||
self.wait_until(lambda: node.waitfornewblock(current_tip=rollback_header['previousblockhash'])['hash'] == current_hash)
|
||||
|
||||
assert_raises_rpc_error(-1, "Negative timeout", node.waitfornewblock, -1)
|
||||
|
||||
def _test_waitforblockheight(self):
|
||||
|
||||
Reference in New Issue
Block a user