5#ifndef BITCOIN_TEST_UTIL_TXMEMPOOL_H
6#define BITCOIN_TEST_UTIL_TXMEMPOOL_H
int64_t CAmount
Amount in satoshis (Can be negative)
CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in-mempool...
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
std::shared_ptr< const CTransaction > CTransactionRef
A mutable version of CTransaction.
Validation result for package mempool acceptance.
TestMemPoolEntryHelper & SigOpsCost(unsigned int _sigopsCost)
TestMemPoolEntryHelper & Time(NodeSeconds tp)
CTxMemPoolEntry FromTx(const CMutableTransaction &tx) const
TestMemPoolEntryHelper & SpendsCoinbase(bool _flag)
TestMemPoolEntryHelper & Height(unsigned int _height)
TestMemPoolEntryHelper & Fee(CAmount _fee)
TestMemPoolEntryHelper & Sequence(uint64_t _seq)
Options struct containing options for constructing a CTxMemPool.
NodeContext struct containing references to chain state and connection state.
void AddToMempool(CTxMemPool &tx_pool, const CTxMemPoolEntry &entry)
One-line wrapper for creating a mempool changeset with a single transaction and applying it.
CTxMemPool::Options MemPoolOptionsForTest(const node::NodeContext &node)
void CheckMempoolTRUCInvariants(const CTxMemPool &tx_pool)
For every transaction in tx_pool, check TRUC invariants:
std::optional< std::string > CheckPackageMempoolAcceptResult(const Package &txns, const PackageMempoolAcceptResult &result, bool expect_valid, const CTxMemPool *mempool)
Check expected properties for every PackageMempoolAcceptResult, regardless of value.
void CheckMempoolEphemeralInvariants(const CTxMemPool &tx_pool)
Check that we never get into a state where an ephemeral dust transaction would be mined without the s...
std::chrono::time_point< NodeClock, std::chrono::seconds > NodeSeconds