Bitcoin Core  27.99.0
P2P Digital Currency
Functions
txmempool.cpp File Reference
#include <test/util/txmempool.h>
#include <chainparams.h>
#include <node/context.h>
#include <node/mempool_args.h>
#include <policy/v3_policy.h>
#include <util/check.h>
#include <util/time.h>
#include <util/translation.h>
#include <validation.h>
Include dependency graph for txmempool.cpp:

Go to the source code of this file.

Functions

CTxMemPool::Options MemPoolOptionsForTest (const NodeContext &node)
 
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. More...
 
void CheckMempoolV3Invariants (const CTxMemPool &tx_pool)
 For every transaction in tx_pool, check v3 invariants: More...
 

Function Documentation

◆ CheckMempoolV3Invariants()

void CheckMempoolV3Invariants ( const CTxMemPool tx_pool)

For every transaction in tx_pool, check v3 invariants:

  • a v3 tx's ancestor count must be within V3_ANCESTOR_LIMIT
  • a v3 tx's descendant count must be within V3_DESCENDANT_LIMIT
  • if a v3 tx has ancestors, its sigop-adjusted vsize must be within V3_CHILD_MAX_VSIZE
  • any non-v3 tx must only have non-v3 parents
  • any v3 tx must only have v3 parents

Definition at line 122 of file txmempool.cpp.

Here is the call graph for this function:

◆ CheckPackageMempoolAcceptResult()

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.

Returns a string if an error occurs with error populated, nullopt otherwise. If mempool is provided, checks that the expected transactions are in mempool (this should be set to nullptr for a test_accept).

Definition at line 42 of file txmempool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MemPoolOptionsForTest()

CTxMemPool::Options MemPoolOptionsForTest ( const NodeContext node)

Definition at line 19 of file txmempool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: