v29.4-roots.4 · Commit 3: [PATCH 03/37] policy: restore conservative relay and network controls
test/functional/p2p_unrequested_blocks.py
Before: test/functional/p2p_unrequested_blocks.py · After: test/functional/p2p_unrequested_blocks.py
File metadata
index 1430131a97cb5bd4d5df279376d4e483aa145f85..9c5ebe29fd311d81ef85e3c6b67a8cd6eac9376c 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)
|