resolves #32965.
node1 (with 24 blocks) causes node0 (with 6 blocks + 1 extra header) to silently reorg. so move the subtest to a point before the 20 blocks are generated so that node1’s state doesn’t cause node0 to silently reorg.
resolves #32965.
node1 (with 24 blocks) causes node0 (with 6 blocks + 1 extra header) to silently reorg. so move the subtest to a point before the 20 blocks are generated so that node1’s state doesn’t cause node0 to silently reorg.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32968.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Possible typos and grammar issues:
drahtbot_id_4_m
100@@ -101,6 +101,7 @@ def run_test(self):
101 assert_equal(self.nodes[0].getbestblockhash(), blockhash_3)
102 assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 3)
103 assert_equal(self.nodes[0].getblockchaininfo()['headers'], 3)
104+ self.disconnect_nodes(0, 1)
This means in the remainder of the test, the state of the two nodes shouldn’t affect each other. So the reconsiderblock+test
0 assert_equal(self.nodes[0].getbestblockhash(), blockhash_6)
1 assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 6)
2 assert_equal(self.nodes[0].getblockchaininfo()['headers'], 7)
Can be moved after this line to disconnect the nodes? This would bundle the tests more nicely, but no strong opinion.
lgtm ACK 4aa0e4d9ce6283665b1aac185da67543b8df606e
Also, left a nit/questsion
node1 (with 24 blocks) causes node0 (with 6 blocks) to silently
reorg. so move the subtest to a point before the 20 blocks are
generated so that node1's state doesn't cause node0 to silently
reorg.
101@@ -102,6 +102,14 @@ def run_test(self):
102 assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 3)
103 assert_equal(self.nodes[0].getblockchaininfo()['headers'], 3)
104
105+ # Reconsider the header
106+ self.nodes[0].reconsiderblock(block.hash)
107+ # Since header doesn't have block data, it can't be chain tip
“Since header doesn't have block data, it can't be chain tip” -> “Since the header doesn't have block data, it can't be the chain tip” [missing definite articles]
lgtm ACK 28416f367a5d720d89214aa8ef94013caa1d1a40
Can be tested via by moving the lines after self.nodes[0].reconsiderblock(block.hash)
down again and observing a failure.
stratospher
DrahtBot
maflcko
mzumsande
Labels
Tests