Skip to content

Commit

Permalink
functional test: Deduplicate assert_mempool_contents()
Browse files Browse the repository at this point in the history
Recently added mempool_util implementation probably evolved in parallel with the package RBF one before being submitted as part of ephemeral dust in e2e30e8.
  • Loading branch information
hodlinator committed Nov 21, 2024
1 parent f34fe08 commit a0eafc1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions test/functional/mempool_package_rbf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
DEFAULT_FEE,
MiniWallet,
)
from test_framework import mempool_util

MAX_REPLACEMENT_CANDIDATES = 100

Expand All @@ -37,15 +38,7 @@ def set_test_params(self):
]] * self.num_nodes

def assert_mempool_contents(self, expected=None):
"""Assert that all transactions in expected are in the mempool,
and no additional ones exist.
"""
if not expected:
expected = []
mempool = self.nodes[0].getrawmempool(verbose=False)
assert_equal(len(mempool), len(expected))
for tx in expected:
assert tx.rehash() in mempool
mempool_util.assert_mempool_contents(self, self.nodes[0], expected, sync=False)

def create_simple_package(self, parent_coin, parent_fee=DEFAULT_FEE, child_fee=DEFAULT_CHILD_FEE, heavy_child=False):
"""Create a 1 parent 1 child package using the coin passed in as the parent's input. The
Expand Down

0 comments on commit a0eafc1

Please sign in to comment.