Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Namespaces | Functions
txmempool.h File Reference
#include <policy/packages.h>
#include <txmempool.h>
#include <util/time.h>
Include dependency graph for txmempool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TestMemPoolEntryHelper
 

Namespaces

 node
 

Functions

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

Function Documentation

◆ CheckMempoolTRUCInvariants()

void CheckMempoolTRUCInvariants ( const CTxMemPool tx_pool)

For every transaction in tx_pool, check TRUC invariants:

  • a TRUC tx's ancestor count must be within TRUC_ANCESTOR_LIMIT
  • a TRUC tx's descendant count must be within TRUC_DESCENDANT_LIMIT
  • if a TRUC tx has ancestors, its sigop-adjusted vsize must be within TRUC_CHILD_MAX_VSIZE
  • any non-TRUC tx must only have non-TRUC parents
  • any TRUC tx must only have TRUC parents

Definition at line 144 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 43 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 node::NodeContext node)

Definition at line 20 of file txmempool.cpp.

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