diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-10 08:37:22 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-10 08:37:25 +0200 |
commit | bb378b6ccdd3804fe38640356e8a27de549c50af (patch) | |
tree | 5faf6ae74052cee642820da8c0473673744571f4 | |
parent | 8ca51aa5fb7959b4c7a458208e251c7a2645175c (diff) | |
parent | 4f67336f1105b7c34a9e8cdafa603edc1d899fb9 (diff) | |
download | bitcoin-bb378b6ccdd3804fe38640356e8a27de549c50af.tar.xz |
Merge bitcoin/bitcoin#26054: test: verify best blockhash after invalidating an unknown block
4f67336f1105b7c34a9e8cdafa603edc1d899fb9 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 4f67336f1105b7c34a9e8cdafa603edc1d899fb9
Tree-SHA512: 2d71743c1d3a317ef7b750f88437df71d1aed2728d9edac8b763a343406e168b97865ab25ec4c89caf09d002e076458376618cbd0845496375f7179633c88af9
-rwxr-xr-x | test/functional/rpc_invalidateblock.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/rpc_invalidateblock.py b/test/functional/rpc_invalidateblock.py index 705fa6c736..1e33e7ca9c 100755 --- a/test/functional/rpc_invalidateblock.py +++ b/test/functional/rpc_invalidateblock.py @@ -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__': |