Skip to content

Commit

Permalink
Fix p2p_orphan_handling.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil committed Oct 28, 2024
1 parent 033dca3 commit 1b7ffaa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/functional/p2p_orphan_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def assert_never_requested(self, txhash):
class OrphanHandlingTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [[]]
self.extra_args = [['-minrelaytxfee=0.00001']]

def create_parent_and_child(self):
"""Create package with 1 parent and 1 child, normal fees (no cpfp)."""
Expand Down Expand Up @@ -383,13 +383,15 @@ def test_orphan_inherit_rejection(self):
# cached by txid and wtxid.
with node.assert_debug_log(['not keeping orphan with rejected parents {}'.format(child["txid"])]):
self.relay_transaction(peer1, child["tx"])
assert_equal(0, len(node.getrawmempool()))
# assert_equal(0, len(node.getrawmempool()))
assert child["txid"] not in node.getrawmempool()
peer1.assert_never_requested(parent_low_fee_nonsegwit["txid"])

# Grandchild should also not be kept in orphanage because its parent has been rejected.
with node.assert_debug_log(['not keeping orphan with rejected parents {}'.format(grandchild["txid"])]):
self.relay_transaction(peer2, grandchild["tx"])
assert_equal(0, len(node.getrawmempool()))
# assert_equal(0, len(node.getrawmempool()))
assert grandchild["txid"] not in node.getrawmempool()
peer2.assert_never_requested(child["txid"])
peer2.assert_never_requested(child["tx"].getwtxid())

Expand All @@ -403,7 +405,7 @@ def run_test(self):
self.wallet_nonsegwit = MiniWallet(self.nodes[0], mode=MiniWalletMode.RAW_P2PK)
self.generate(self.wallet_nonsegwit, 10)
self.wallet = MiniWallet(self.nodes[0])
self.generate(self.wallet, 160)
self.generate(self.wallet, 2160)
self.test_arrival_timing_orphan()
self.test_orphan_rejected_parents_exceptions()
self.test_orphan_multiple_parents()
Expand Down

0 comments on commit 1b7ffaa

Please sign in to comment.