mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +01:00
Merge bitcoin/bitcoin#26054: test: verify best blockhash after invalidating an unknown block
4f67336f11
test: verify best blockhash after invalidating an unknown block (brunoerg) Pull request description: Fixes #26051 Verify the best blockhash is the same after invalidating an unknown block, not the whole `getchaintip` response. ACKs for top commit: instagibbs: ACK4f67336f11
Tree-SHA512: 2d71743c1d3a317ef7b750f88437df71d1aed2728d9edac8b763a343406e168b97865ab25ec4c89caf09d002e076458376618cbd0845496375f7179633c88af9
This commit is contained in:
commit
bb378b6ccd
@ -85,9 +85,8 @@ class InvalidateTest(BitcoinTestFramework):
|
||||
assert_equal(self.nodes[1].getbestblockhash(), blocks[-1])
|
||||
|
||||
self.log.info("Verify that invalidating an unknown block throws an error")
|
||||
chain_tips = self.nodes[1].getchaintips()
|
||||
assert_raises_rpc_error(-5, "Block not found", self.nodes[1].invalidateblock, "00" * 32)
|
||||
assert_equal(chain_tips, self.nodes[1].getchaintips())
|
||||
assert_equal(self.nodes[1].getbestblockhash(), blocks[-1])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user