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
This commit is contained in:
kevkevinpal committed 2025-01-28 10:14:01 -05:00
1 parent b432e36742
commit 93747d934b
1 file changed
+1
+1
View File
@@ -549,6 +549,7 @@ class BlockchainTest(BitcoinTestFramework):
# 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")