Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: added additional coverage to waitforblock and waitforblockheigh…
…t rpc's
  • Loading branch information
kevkevinpal committed Feb 3, 2025
commit 7e0db87d4fff996c086f6e86b62338c98ef30c55
2 changes: 2 additions & 0 deletions test/functional/rpc_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ def _test_waitforblock(self):

self.log.debug("waitforblock should return the same block after its timeout")
assert_equal(node.waitforblock(blockhash=current_hash, timeout=1)['hash'], rollback_header['previousblockhash'])
assert_raises_rpc_error(-1, "Negative timeout", node.waitforblock, current_hash, -1)

node.reconsiderblock(rollback_hash)
# The chain has probably already been restored by the time reconsiderblock returns,
Expand Down Expand Up @@ -589,6 +590,7 @@ def assert_waitforheight(height, timeout=2):
assert_waitforheight(current_height - 1)
assert_waitforheight(current_height)
assert_waitforheight(current_height + 1)
assert_raises_rpc_error(-1, "Negative timeout", node.waitforblockheight, current_height, -1)

def _test_getblock(self):
node = self.nodes[0]
Expand Down
Loading