Skip to content

Commit 93747d9

Browse files
committed
test: Added coverage to the waitfornewblock rpc
Added a test for the Negative timeout error if the rpc is given a negative value for its timeout arg
1 parent b432e36 commit 93747d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def _test_waitforblock(self):
549549
# The chain has probably already been restored by the time reconsiderblock returns,
550550
# but poll anyway.
551551
self.wait_until(lambda: node.waitfornewblock(timeout=100)['hash'] == current_hash)
552+
assert_raises_rpc_error(-1, "Negative timeout", node.waitfornewblock, -1)
552553

553554
def _test_waitforblockheight(self):
554555
self.log.info("Test waitforblockheight")

0 commit comments

Comments
 (0)