Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Functions | Variables
mempool_stress.cpp File Reference
#include <bench/bench.h>
#include <consensus/amount.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <random.h>
#include <script/script.h>
#include <sync.h>
#include <test/util/setup_common.h>
#include <test/util/txmempool.h>
#include <txmempool.h>
#include <validation.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <vector>
Include dependency graph for mempool_stress.cpp:

Go to the source code of this file.

Classes

struct  Available
 

Functions

static void AddTx (const CTransactionRef &tx, CTxMemPool &pool) EXCLUSIVE_LOCKS_REQUIRED(cs_main
 
 AddToMempool (pool, CTxMemPoolEntry(tx, 1000, nTime, nHeight, sequence, spendsCoinbase, sigOpCost, lp))
 
static std::vector< CTransactionRefCreateOrderedCoins (FastRandomContext &det_rand, int childTxs, int min_ancestors)
 
static void ComplexMemPool (benchmark::Bench &bench)
 
static void MempoolCheck (benchmark::Bench &bench)
 
 BENCHMARK (ComplexMemPool, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (MempoolCheck, benchmark::PriorityLevel::HIGH)
 

Variables

static void pool cs
 
unsigned int nHeight = 1
 
uint64_t sequence = 0
 
bool spendsCoinbase = false
 
unsigned int sigOpCost = 4
 
LockPoints lp
 

Function Documentation

◆ AddToMempool()

AddToMempool ( pool  ,
CTxMemPoolEntry(tx, 1000, nTime, nHeight, sequence, spendsCoinbase, sigOpCost, lp  
)

◆ AddTx()

static void AddTx ( const CTransactionRef tx,
CTxMemPool pool 
)
static
Here is the caller graph for this function:

◆ BENCHMARK() [1/2]

◆ BENCHMARK() [2/2]

◆ ComplexMemPool()

static void ComplexMemPool ( benchmark::Bench bench)
static

Definition at line 94 of file mempool_stress.cpp.

Here is the call graph for this function:

◆ CreateOrderedCoins()

static std::vector< CTransactionRef > CreateOrderedCoins ( FastRandomContext det_rand,
int  childTxs,
int  min_ancestors 
)
static

Definition at line 42 of file mempool_stress.cpp.

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

◆ MempoolCheck()

static void MempoolCheck ( benchmark::Bench bench)
static

Definition at line 114 of file mempool_stress.cpp.

Here is the call graph for this function:

Variable Documentation

◆ cs

void pool cs
Initial value:
{
int64_t nTime = 0

Definition at line 24 of file mempool_stress.cpp.

◆ lp

Definition at line 31 of file mempool_stress.cpp.

◆ nHeight

unsigned int nHeight = 1

Definition at line 27 of file mempool_stress.cpp.

◆ sequence

uint64_t sequence = 0

Definition at line 28 of file mempool_stress.cpp.

◆ sigOpCost

unsigned int sigOpCost = 4

Definition at line 30 of file mempool_stress.cpp.

◆ spendsCoinbase

bool spendsCoinbase = false

Definition at line 29 of file mempool_stress.cpp.