File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ def run_test(self):
60
60
block .solve ()
61
61
# Save the coinbase for later
62
62
block1 = block
63
- tip = block .sha256
64
63
node .p2ps [0 ].send_blocks_and_test ([block ], node , success = True )
65
64
66
65
self .log .info ("Mature the block." )
@@ -157,13 +156,18 @@ def run_test(self):
157
156
with node .assert_debug_log (['orphanage overflow, removed 1 tx' ]):
158
157
node .p2ps [0 ].send_txs_and_test (orphan_tx_pool , node , success = False )
159
158
159
+ self .log .info ('Test orphan with rejected parents' )
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
165
node .p2ps [0 ].send_txs_and_test ([rejected_parent ], node , success = False )
166
166
167
+ self .log .info ('Test that a peer disconnection causes erase its transactions from the orphan pool' )
168
+ with node .assert_debug_log (['Erased 100 orphan tx from peer=25' ]):
169
+ self .reconnect_p2p (num_connections = 1 )
170
+
167
171
168
172
if __name__ == '__main__' :
169
173
InvalidTxRequestTest ().main ()
You can’t perform that action at this time.
0 commit comments