Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 3: [PATCH 03/68] feat(policy): preserve Roots relay and network controls on Core 30.3

test/functional/p2p_unrequested_blocks.py

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

File metadata
index b165b809d78acbefdbb4d6a96b13d25124e12ee4..10fc724dec14f1214edc78cc06fc618a37645d2c 100755

Download original patch · Release notes

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

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

test/functional/p2p_unrequested_blocks.py CHANGED
@@ -80,7 +80,7 @@ class AcceptBlockTest(BitcoinTestFramework):
80
80
  return False
81
81
 
82
82
  def run_test(self):
83
- test_node = self.nodes[0].add_p2p_connection(P2PInterface())
83
+ test_node = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=0)
84
84
  min_work_node = self.nodes[1].add_p2p_connection(P2PInterface())
85
85
 
86
86
  # 1. Have nodes mine a block (leave IBD)
@@ -203,7 +203,7 @@ class AcceptBlockTest(BitcoinTestFramework):
203
203
  self.nodes[0].disconnect_p2ps()
204
204
  self.nodes[1].disconnect_p2ps()
205
205
 
206
- test_node = self.nodes[0].add_p2p_connection(P2PInterface())
206
+ test_node = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=2)
207
207
 
208
208
  test_node.send_and_ping(msg_block(block_h1f))
209
209
  assert_equal(self.nodes[0].getblockcount(), 2)
@@ -275,7 +275,7 @@ class AcceptBlockTest(BitcoinTestFramework):
275
275
  test_node.wait_for_disconnect()
276
276
 
277
277
  self.nodes[0].disconnect_p2ps()
278
- test_node = self.nodes[0].add_p2p_connection(P2PInterface())
278
+ test_node = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=3)
279
279
 
280
280
  # We should have failed reorg and switched back to 290 (but have block 291)
281
281
  assert_equal(self.nodes[0].getblockcount(), 290)