rpc: call RecalculateBestHeader as part of reconsiderblock

Co-authored-by: Fabian Jahr <fjahr@protonmail.com>
This commit is contained in:
Martin ZumsandeandFabian Jahr committed 2024-09-17 11:39:21 -04:00
1 parent a51e91783a
commit 9275e9689a
2 files changed
+3

No files matched your search

+2
View File
@@ -83,6 +83,8 @@ class InvalidateTest(BitcoinTestFramework):
self.nodes[1].reconsiderblock(blocks[-4])
# Should be back at the tip by now
assert_equal(self.nodes[1].getbestblockhash(), blocks[-1])
# Should report consistent blockchain info
assert_equal(self.nodes[1].getblockchaininfo()["headers"], self.nodes[1].getblockchaininfo()["blocks"])
self.log.info("Verify that invalidating an unknown block throws an error")
assert_raises_rpc_error(-5, "Block not found", self.nodes[1].invalidateblock, "00" * 32)