Skip to content

Commit 18820cc

Browse files
committed
multi-announcer orphan handling test fixups
1 parent c4cc61d commit 18820cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/p2p_orphan_handling.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,16 +776,18 @@ def test_parents_change(self):
776776
assert tx_replacer_BC["txid"] in node.getrawmempool()
777777
node.sendrawtransaction(tx_replacer_C["hex"])
778778
assert tx_replacer_BC["txid"] not in node.getrawmempool()
779+
assert parent_peekaboo_AB["txid"] not in node.getrawmempool()
779780
assert tx_replacer_C["txid"] in node.getrawmempool()
780781

781-
# Second peer is an additional announcer for this orphan
782+
# Second peer is an additional announcer for this orphan, but its missing parents are different from when it was
783+
# previously announced.
782784
peer2 = node.add_p2p_connection(PeerTxRelayer())
783785
peer2.send_and_ping(msg_inv([orphan_inv]))
784786
assert_equal(len(node.getorphantxs(verbosity=2)[0]["from"]), 2)
785787

786788
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
787789
peer1.peer_disconnect()
788-
node.bumpmocktime(NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY)
790+
node.bumpmocktime(TXREQUEST_TIME_SKIP)
789791
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
790792
# Both parents should be requested, now that they are both missing.
791793
peer2.wait_for_parent_requests([int(parent_peekaboo_AB["txid"], 16), int(parent_missing["txid"], 16)])

0 commit comments

Comments
 (0)