Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 3: [PATCH 03/13] policy: restore conservative relay and network controls

test/functional/p2p_mutated_blocks.py

Before: test/functional/p2p_mutated_blocks.py · After: test/functional/p2p_mutated_blocks.py

File metadata
index 4a790168dad2d2cbd125c745be24fd87c450f059..cc88a0ee7bed28a4974d4f5daff5e69571bcd0bc 100755

Download original patch · Release notes

Diff rows 1–8 of 8. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

test/functional/p2p_mutated_blocks.py CHANGED
@@ -99,7 +99,7 @@ class MutatedBlocksTest(BitcoinTestFramework):
99
 
100
  # Check that unexpected-witness mutation check doesn't trigger on a header that doesn't connect to anything
101
  assert_equal(len(self.nodes[0].getpeerinfo()), 1)
102
- attacker = self.nodes[0].add_p2p_connection(P2PInterface())
103
  block_missing_prev = copy.deepcopy(block)
104
  block_missing_prev.hashPrevBlock = 123
105
  block_missing_prev.solve()
 
99
 
100
  # Check that unexpected-witness mutation check doesn't trigger on a header that doesn't connect to anything
101
  assert_equal(len(self.nodes[0].getpeerinfo()), 1)
102
+ attacker = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=1)
103
  block_missing_prev = copy.deepcopy(block)
104
  block_missing_prev.hashPrevBlock = 123
105
  block_missing_prev.solve()