functional test: Add ephemeral dust tests

This commit is contained in:
Greg Sanders committed 2024-11-12 09:24:54 -05:00
1 parent 4e68f90139
commit e2e30e89ba
3 files changed
+497

No files matched your search

@@ -21,6 +21,20 @@ from .wallet import (
ORPHAN_TX_EXPIRE_TIME = 1200
def assert_mempool_contents(test_framework, node, expected=None, sync=True):
"""Assert that all transactions in expected are in the mempool,
and no additional ones exist. 'expected' is an array of
CTransaction objects
"""
if sync:
test_framework.sync_mempools()
if not expected:
expected = []
mempool = node.getrawmempool(verbose=False)
assert_equal(len(mempool), len(expected))
for tx in expected:
assert tx.rehash() in mempool
def fill_mempool(test_framework, node, *, tx_sync_fun=None):
"""Fill mempool until eviction.