v30.3-roots.1 · Commit 3: [PATCH 03/68] feat(policy): preserve Roots relay and network controls on Core 30.3
test/functional/p2p_invalid_tx.py
Before: test/functional/p2p_invalid_tx.py · After: test/functional/p2p_invalid_tx.py
File metadata
index 0d4c4ffbd42b1cbd70ad7474314de16e95b3a849..b31de311547206693a5cca8bbd6231892429075f 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_invalid_tx.py
CHANGED
|
@@ -33,8 +33,8 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
|
|
33
33
|
"""Add a P2P connection to the node.
|
|
34
34
|
|
|
35
35
|
Helper to connect and wait for version handshake."""
|
|
36
|
-
for _ in range(num_connections):
|
|
37
|
-
self.nodes[0].add_p2p_connection(P2PDataStore())
|
|
36
|
+
for i in range(num_connections):
|
|
37
|
+
self.nodes[0].add_outbound_p2p_connection(P2PDataStore(), p2p_idx=i)
|
|
38
38
|
|
|
39
39
|
def reconnect_p2p(self, **kwargs):
|
|
40
40
|
"""Tear down and bootstrap the P2P connection to the node.
|
|
@@ -179,6 +179,7 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
|
|
179
179
|
self.log.info('Send the block that includes the previous orphan ... ')
|
|
180
180
|
with node.assert_debug_log(["Erased 1 orphan transaction(s) included or conflicted by block"]):
|
|
181
181
|
node.p2ps[0].send_blocks_and_test([block_A], node, success=True)
|
|
182
|
+
node.syncwithvalidationinterfacequeue()
|
|
182
183
|
|
|
183
184
|
self.log.info('Test that a transaction in the orphan pool conflicts with a new tip block causes erase this transaction from the orphan pool')
|
|
184
185
|
tx_withhold_until_block_B = CTransaction()
|
|
@@ -205,6 +206,7 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
|
|
205
206
|
self.log.info('Send the block that includes a transaction which conflicts with the previous orphan ... ')
|
|
206
207
|
with node.assert_debug_log(["Erased 1 orphan transaction(s) included or conflicted by block"]):
|
|
207
208
|
node.p2ps[0].send_blocks_and_test([block_B], node, success=True)
|
|
209
|
+
node.syncwithvalidationinterfacequeue()
|
|
208
210
|
|
|
209
211
|
|
|
210
212
|
if __name__ == '__main__':
|