mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
Merge bitcoin/bitcoin#31338: test: Deduplicate assert_mempool_contents()
Some checks failed
Some checks failed
a0eafc10f9
functional test: Deduplicate assert_mempool_contents() (Hodlinator) Pull request description: Recently added `mempool_util` implementation probably evolved in parallel with the package RBF one before being submitted as part of ephemeral dust ine2e30e89ba
(related comments: https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1825278134, https://github.com/bitcoin/bitcoin/pull/31279#pullrequestreview-2445579323). ACKs for top commit: instagibbs: ACKa0eafc10f9
achow101: ACKa0eafc10f9
l0rinc: ACKa0eafc10f9
theStack: ACKa0eafc10f9
Tree-SHA512: 25ea807d7c041c18be0e4f424131419365d7c1e0fc6c4fb7ac7289c2f8196fd341ff2a2a3ea88df2c3a389edb4571a5fb889efc1b0204c65f7e09ef8f608d0d3
This commit is contained in:
commit
2638fdb4f9
1 changed files with 2 additions and 9 deletions
|
@ -19,6 +19,7 @@ from test_framework.wallet import (
|
|||
DEFAULT_FEE,
|
||||
MiniWallet,
|
||||
)
|
||||
from test_framework import mempool_util
|
||||
|
||||
MAX_REPLACEMENT_CANDIDATES = 100
|
||||
|
||||
|
@ -37,15 +38,7 @@ class PackageRBFTest(BitcoinTestFramework):
|
|||
]] * 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
|
||||
|
|
Loading…
Reference in a new issue