functional test: Add ephemeral dust tests

This commit is contained in:
Greg Sanders
2024-07-19 12:26:09 -04:00
parent 4e68f90139
commit e2e30e89ba
3 changed files with 497 additions and 0 deletions

View File

@@ -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.