diff options
Diffstat (limited to 'test/functional/p2p_orphan_handling.py')
-rwxr-xr-x | test/functional/p2p_orphan_handling.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/p2p_orphan_handling.py b/test/functional/p2p_orphan_handling.py index 755cb8f3e9..e839b2d987 100755 --- a/test/functional/p2p_orphan_handling.py +++ b/test/functional/p2p_orphan_handling.py @@ -312,7 +312,7 @@ class OrphanHandlingTest(BitcoinTestFramework): # Even though the peer would send a notfound for the "old" confirmed transaction, the node # doesn't give up on the orphan. Once all of the missing parents are received, it should be # submitted to mempool. - peer.send_message(msg_notfound(vec=[CInv(MSG_WITNESS_TX, int(txid_conf_old, 16))])) + peer.send_without_ping(msg_notfound(vec=[CInv(MSG_WITNESS_TX, int(txid_conf_old, 16))])) # Sync with ping to ensure orphans are reconsidered peer.send_and_ping(msg_tx(missing_tx["tx"])) assert_equal(node.getmempoolentry(orphan["txid"])["ancestorcount"], 3) @@ -611,7 +611,7 @@ class OrphanHandlingTest(BitcoinTestFramework): tx_child_1 = self.wallet.create_self_transfer(utxo_to_spend=tx_parent_1["new_utxo"]) parent_orphans.append(tx_parent_1["tx"]) orphans.append(tx_child_1["tx"]) - peer_1.send_message(msg_tx(tx_child_1["tx"])) + peer_1.send_without_ping(msg_tx(tx_child_1["tx"])) peer_1.sync_with_ping() orphanage = node.getorphantxs() @@ -771,7 +771,7 @@ class OrphanHandlingTest(BitcoinTestFramework): node.bumpmocktime(NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY) peer1.wait_for_getdata([int(parent_missing["txid"], 16)]) - # Replace parent_peekaboo_AB so that is is a newly missing parent. + # Replace parent_peekaboo_AB so that is a newly missing parent. # Then, replace the replacement so that it can be resubmitted. node.sendrawtransaction(tx_replacer_BC["hex"]) assert tx_replacer_BC["txid"] in node.getrawmempool() @@ -788,6 +788,8 @@ class OrphanHandlingTest(BitcoinTestFramework): # Disconnect peer1. peer2 should become the new candidate for orphan resolution. peer1.peer_disconnect() + self.wait_until(lambda: node.num_test_p2p_connections() == 1) + peer2.sync_with_ping() # Sync with the 'net' thread which completes the disconnection fully node.bumpmocktime(TXREQUEST_TIME_SKIP) self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1) # Both parents should be requested, now that they are both missing. |