@@ -61,7 +61,7 @@ def run_test(self):
61
61
# Save the coinbase for later
62
62
block1 = block
63
63
tip = block .sha256
64
- node .p2p .send_blocks_and_test ([block ], node , success = True )
64
+ node .p2ps [ 0 ] .send_blocks_and_test ([block ], node , success = True )
65
65
66
66
self .log .info ("Mature the block." )
67
67
self .nodes [0 ].generatetoaddress (100 , self .nodes [0 ].get_deterministic_priv_key ().address )
@@ -72,7 +72,7 @@ def run_test(self):
72
72
self .log .info ("Testing invalid transaction: %s" , BadTxTemplate .__name__ )
73
73
template = BadTxTemplate (spend_block = block1 )
74
74
tx = template .get_tx ()
75
- node .p2p .send_txs_and_test (
75
+ node .p2ps [ 0 ] .send_txs_and_test (
76
76
[tx ], node , success = False ,
77
77
expect_disconnect = template .expect_disconnect ,
78
78
reject_reason = template .reject_reason ,
@@ -121,7 +121,7 @@ def run_test(self):
121
121
122
122
self .log .info ('Send the orphans ... ' )
123
123
# Send valid orphan txs from p2ps[0]
124
- node .p2p .send_txs_and_test ([tx_orphan_1 , tx_orphan_2_no_fee , tx_orphan_2_valid ], node , success = False )
124
+ node .p2ps [ 0 ] .send_txs_and_test ([tx_orphan_1 , tx_orphan_2_no_fee , tx_orphan_2_valid ], node , success = False )
125
125
# Send invalid tx from p2ps[1]
126
126
node .p2ps [1 ].send_txs_and_test ([tx_orphan_2_invalid ], node , success = False )
127
127
@@ -130,7 +130,7 @@ def run_test(self):
130
130
131
131
self .log .info ('Send the withhold tx ... ' )
132
132
with node .assert_debug_log (expected_msgs = ["bad-txns-in-belowout" ]):
133
- node .p2p .send_txs_and_test ([tx_withhold ], node , success = True )
133
+ node .p2ps [ 0 ] .send_txs_and_test ([tx_withhold ], node , success = True )
134
134
135
135
# Transactions that should end up in the mempool
136
136
expected_mempool = {
@@ -155,14 +155,14 @@ def run_test(self):
155
155
orphan_tx_pool [i ].vout .append (CTxOut (nValue = 11 * COIN , scriptPubKey = SCRIPT_PUB_KEY_OP_TRUE ))
156
156
157
157
with node .assert_debug_log (['mapOrphan overflow, removed 1 tx' ]):
158
- node .p2p .send_txs_and_test (orphan_tx_pool , node , success = False )
158
+ node .p2ps [ 0 ] .send_txs_and_test (orphan_tx_pool , node , success = False )
159
159
160
160
rejected_parent = CTransaction ()
161
161
rejected_parent .vin .append (CTxIn (outpoint = COutPoint (tx_orphan_2_invalid .sha256 , 0 )))
162
162
rejected_parent .vout .append (CTxOut (nValue = 11 * COIN , scriptPubKey = SCRIPT_PUB_KEY_OP_TRUE ))
163
163
rejected_parent .rehash ()
164
164
with node .assert_debug_log (['not keeping orphan with rejected parents {}' .format (rejected_parent .hash )]):
165
- node .p2p .send_txs_and_test ([rejected_parent ], node , success = False )
165
+ node .p2ps [ 0 ] .send_txs_and_test ([rejected_parent ], node , success = False )
166
166
167
167
168
168
if __name__ == '__main__' :
0 commit comments