Skip to content

Commit 2aa63d5

Browse files
committed
test: Use uninvolved pruned node in feature_pruning undo test
After fixing the nTime variable name, the test_pruneheight_undo_presence test began failing because node 2, which is involved in reorg testing, could be on a different chain than other nodes. This caused failures when trying to fetch blocks from other nodes that didn't recognize node 2's chain. Switch to using node 5 instead, which is also a pruned node but isn't involved in reorg testing, ensuring it stays on the same chain as the other nodes. This allows the block fetching to work as intended in the test.
1 parent 772ba7f commit 2aa63d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/functional/feature_pruning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,11 @@ def test_scanblocks_pruned(self):
500500
"start", [{"desc": f"raw({false_positive_spk.hex()})"}], 0, 0, "basic", {"filter_false_positives": True})
501501

502502
def test_pruneheight_undo_presence(self):
503-
node = self.nodes[2]
503+
node = self.nodes[5]
504504
pruneheight = node.getblockchaininfo()["pruneheight"]
505505
fetch_block = node.getblockhash(pruneheight - 1)
506506

507-
self.connect_nodes(1, 2)
507+
self.connect_nodes(1, 5)
508508
peers = node.getpeerinfo()
509509
node.getblockfrompeer(fetch_block, peers[0]["id"])
510510
self.wait_until(lambda: not try_rpc(-1, "Block not available (pruned data)", node.getblock, fetch_block), timeout=5)

0 commit comments

Comments
 (0)