Skip to content

Commit bb378b6

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#26054: test: verify best blockhash after invalidating an unknown block
4f67336 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: ACK 4f67336 Tree-SHA512: 2d71743c1d3a317ef7b750f88437df71d1aed2728d9edac8b763a343406e168b97865ab25ec4c89caf09d002e076458376618cbd0845496375f7179633c88af9
2 parents 8ca51aa + 4f67336 commit bb378b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/functional/rpc_invalidateblock.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ def run_test(self):
8585
assert_equal(self.nodes[1].getbestblockhash(), blocks[-1])
8686

8787
self.log.info("Verify that invalidating an unknown block throws an error")
88-
chain_tips = self.nodes[1].getchaintips()
8988
assert_raises_rpc_error(-5, "Block not found", self.nodes[1].invalidateblock, "00" * 32)
90-
assert_equal(chain_tips, self.nodes[1].getchaintips())
89+
assert_equal(self.nodes[1].getbestblockhash(), blocks[-1])
9190

9291

9392
if __name__ == '__main__':

0 commit comments

Comments
 (0)