mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-07 19:48:58 +02:00
Merge bitcoin/bitcoin#31746: test: Added coverage to the waitfornewblock rpc
93747d934b8a5a1732732a958c0d7e2f5dd0b8c2 test: Added coverage to the waitfornewblock rpc (kevkevinpal) Pull request description: Added a test for the Negative timeout error if the rpc is given a negative value for its timeout arg This adds coverage to the `waitfornewblock` rpc you can check to see there is no coverage for this error by doing `grep -nri "Negative timeout" ./test/` and nothing shows up, you can also see by manually checking where we call `waitfornewblock` in the functional tests ACKs for top commit: Sjors: tACK 93747d934b8a5a1732732a958c0d7e2f5dd0b8c2 achow101: ACK 93747d934b8a5a1732732a958c0d7e2f5dd0b8c2 brunoerg: code review ACK 93747d934b8a5a1732732a958c0d7e2f5dd0b8c2 tdb3: ACK 93747d934b8a5a1732732a958c0d7e2f5dd0b8c2 Tree-SHA512: 45cf34312412d3691a39f003bcd54791ea16542aa3f5a2674d7499c9cc4039550b2cbd32cc3d4c5fe100d65cb05690594b10a0c42dfab63bcca3dac121bb195b
This commit is contained in:
commit
eaf4b928e7
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user