Skip to content

Commit

Permalink
test: Added coverage to the waitfornewblock rpc
Browse files Browse the repository at this point in the history
Added a test for the Negative timeout error if the rpc is given a
negative value for its timeout arg
  • Loading branch information
kevkevinpal committed Jan 28, 2025
1 parent b432e36 commit 93747d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/rpc_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ def _test_waitforblock(self):
# 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)
assert_raises_rpc_error(-1, "Negative timeout", node.waitfornewblock, -1)

def _test_waitforblockheight(self):
self.log.info("Test waitforblockheight")
Expand Down

0 comments on commit 93747d9

Please sign in to comment.