|
43 | 43 | # for one peer and y seconds for another, use specific values instead. |
44 | 44 | TXREQUEST_TIME_SKIP = NONPREF_PEER_TX_DELAY + TXID_RELAY_DELAY + OVERLOADED_PEER_TX_DELAY + 1 |
45 | 45 |
|
46 | | -DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100 |
47 | | - |
48 | 46 | def cleanup(func): |
49 | 47 | # Time to fastfoward (using setmocktime) in between subtests to ensure they do not interfere with |
50 | 48 | # one another, in seconds. Equal to 12 hours, which is enough to expire anything that may exist |
@@ -593,46 +591,6 @@ def test_orphan_txid_inv(self): |
593 | 591 | assert_equal(node.getmempoolentry(tx_child["txid"])["wtxid"], tx_child["wtxid"]) |
594 | 592 | self.wait_until(lambda: len(node.getorphantxs()) == 0) |
595 | 593 |
|
596 | | - @cleanup |
597 | | - def test_max_orphan_amount(self): |
598 | | - self.log.info("Check that we never exceed our storage limits for orphans") |
599 | | - |
600 | | - node = self.nodes[0] |
601 | | - self.generate(self.wallet, 1) |
602 | | - peer_1 = node.add_p2p_connection(P2PInterface()) |
603 | | - |
604 | | - self.log.info("Check that orphanage is empty on start of test") |
605 | | - assert len(node.getorphantxs()) == 0 |
606 | | - |
607 | | - self.log.info("Filling up orphanage with " + str(DEFAULT_MAX_ORPHAN_TRANSACTIONS) + "(DEFAULT_MAX_ORPHAN_TRANSACTIONS) orphans") |
608 | | - orphans = [] |
609 | | - parent_orphans = [] |
610 | | - for _ in range(DEFAULT_MAX_ORPHAN_TRANSACTIONS): |
611 | | - tx_parent_1 = self.wallet.create_self_transfer() |
612 | | - tx_child_1 = self.wallet.create_self_transfer(utxo_to_spend=tx_parent_1["new_utxo"]) |
613 | | - parent_orphans.append(tx_parent_1["tx"]) |
614 | | - orphans.append(tx_child_1["tx"]) |
615 | | - peer_1.send_without_ping(msg_tx(tx_child_1["tx"])) |
616 | | - |
617 | | - peer_1.sync_with_ping() |
618 | | - orphanage = node.getorphantxs() |
619 | | - self.wait_until(lambda: len(node.getorphantxs()) == DEFAULT_MAX_ORPHAN_TRANSACTIONS) |
620 | | - |
621 | | - for orphan in orphans: |
622 | | - assert tx_in_orphanage(node, orphan) |
623 | | - |
624 | | - self.log.info("Check that we do not add more than the max orphan amount") |
625 | | - tx_parent_1 = self.wallet.create_self_transfer() |
626 | | - tx_child_1 = self.wallet.create_self_transfer(utxo_to_spend=tx_parent_1["new_utxo"]) |
627 | | - peer_1.send_and_ping(msg_tx(tx_child_1["tx"])) |
628 | | - parent_orphans.append(tx_parent_1["tx"]) |
629 | | - orphanage = node.getorphantxs() |
630 | | - assert_equal(len(orphanage), DEFAULT_MAX_ORPHAN_TRANSACTIONS) |
631 | | - |
632 | | - self.log.info("Clearing the orphanage") |
633 | | - for index, parent_orphan in enumerate(parent_orphans): |
634 | | - peer_1.send_and_ping(msg_tx(parent_orphan)) |
635 | | - self.wait_until(lambda: len(node.getorphantxs()) == 0) |
636 | 594 |
|
637 | 595 | @cleanup |
638 | 596 | def test_orphan_handling_prefer_outbound(self): |
@@ -820,7 +778,6 @@ def run_test(self): |
820 | 778 | self.test_same_txid_orphan() |
821 | 779 | self.test_same_txid_orphan_of_orphan() |
822 | 780 | self.test_orphan_txid_inv() |
823 | | - self.test_max_orphan_amount() |
824 | 781 | self.test_orphan_handling_prefer_outbound() |
825 | 782 | self.test_announcers_before_and_after() |
826 | 783 | self.test_parents_change() |
|
0 commit comments