Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
mempool.cpp File Reference
#include <rpc/blockchain.h>
#include <node/mempool_persist.h>
#include <chainparams.h>
#include <common/args.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <index/txospenderindex.h>
#include <kernel/mempool_entry.h>
#include <net_processing.h>
#include <netbase.h>
#include <node/mempool_persist_args.h>
#include <node/types.h>
#include <policy/rbf.h>
#include <policy/settings.h>
#include <primitives/transaction.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <txmempool.h>
#include <univalue.h>
#include <util/fs.h>
#include <util/moneystr.h>
#include <util/strencodings.h>
#include <util/time.h>
#include <util/vector.h>
#include <map>
#include <string_view>
#include <utility>
Include dependency graph for mempool.cpp:

Go to the source code of this file.

Enumerations

enum class  TransactionError

Functions

static RPCHelpMan sendrawtransaction ()
static RPCHelpMan getprivatebroadcastinfo ()
static RPCHelpMan abortprivatebroadcast ()
static RPCHelpMan testmempoolaccept ()
static std::vector< RPCResultClusterDescription ()
static std::vector< RPCResultMempoolEntryDescription ()
void AppendChunkInfo (UniValue &all_chunks, FeePerWeight chunk_feerate, std::vector< const CTxMemPoolEntry * > chunk_txs)
static void clusterToJSON (const CTxMemPool &pool, UniValue &info, std::vector< const CTxMemPoolEntry * > cluster) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
static void entryToJSON (const CTxMemPool &pool, UniValue &info, const CTxMemPoolEntry &e) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
UniValue MempoolToJSON (const CTxMemPool &pool, bool verbose, bool include_mempool_sequence)
 Mempool to JSON.
static RPCHelpMan getmempoolfeeratediagram ()
static RPCHelpMan getrawmempool ()
static RPCHelpMan getmempoolancestors ()
static RPCHelpMan getmempooldescendants ()
static RPCHelpMan getmempoolcluster ()
static RPCHelpMan getmempoolentry ()
static RPCHelpMan gettxspendingprevout ()
UniValue MempoolInfoToJSON (const CTxMemPool &pool)
 Mempool information to JSON.
static RPCHelpMan getmempoolinfo ()
static RPCHelpMan importmempool ()
static RPCHelpMan savemempool ()
static std::vector< RPCResultOrphanDescription ()
static UniValue OrphanToJSON (const node::TxOrphanage::OrphanInfo &orphan)
static RPCHelpMan getorphantxs ()
static RPCHelpMan submitpackage ()
void RegisterMempoolRPCCommands (CRPCTable &t)
bool DumpMempool (const CTxMemPool &pool, const fs::path &dump_path, fsbridge::FopenFn mockable_fopen_function=fsbridge::fopen, bool skip_file_commit=false)
 Dump the mempool to a file.
fs::path MempoolPath (const ArgsManager &argsman)
template<typename T>
std::string ToString (const T &t)
 Locale-independent version of std::to_string.

Variables

static const CAmount DEFAULT_MAX_BURN_AMOUNT
 Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls.
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE
 Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.

Enumeration Type Documentation

◆ TransactionError

enum class node::TransactionError
strong

Definition at line 28 of file types.h.

Function Documentation

◆ abortprivatebroadcast()

RPCHelpMan abortprivatebroadcast ( )
static

Definition at line 207 of file mempool.cpp.

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

◆ AppendChunkInfo()

void AppendChunkInfo ( UniValue & all_chunks,
FeePerWeight chunk_feerate,
std::vector< const CTxMemPoolEntry * > chunk_txs )

Definition at line 461 of file mempool.cpp.

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

◆ ClusterDescription()

std::vector< RPCResult > ClusterDescription ( )
static

Definition at line 413 of file mempool.cpp.

Here is the caller graph for this function:

◆ clusterToJSON()

void clusterToJSON ( const CTxMemPool & pool,
UniValue & info,
std::vector< const CTxMemPoolEntry * > cluster )
static

Definition at line 474 of file mempool.cpp.

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

◆ DumpMempool()

bool node::DumpMempool ( const CTxMemPool & pool,
const fs::path & dump_path,
fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen,
bool skip_file_commit = false )

Dump the mempool to a file.

Definition at line 153 of file mempool_persist.cpp.

Here is the caller graph for this function:

◆ entryToJSON()

void entryToJSON ( const CTxMemPool & pool,
UniValue & info,
const CTxMemPoolEntry & e )
static

Definition at line 508 of file mempool.cpp.

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

◆ getmempoolancestors()

RPCHelpMan getmempoolancestors ( )
static

Definition at line 703 of file mempool.cpp.

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

◆ getmempoolcluster()

RPCHelpMan getmempoolcluster ( )
static

Definition at line 829 of file mempool.cpp.

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

◆ getmempooldescendants()

RPCHelpMan getmempooldescendants ( )
static

Definition at line 764 of file mempool.cpp.

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

◆ getmempoolentry()

RPCHelpMan getmempoolentry ( )
static

Definition at line 864 of file mempool.cpp.

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

◆ getmempoolfeeratediagram()

RPCHelpMan getmempoolfeeratediagram ( )
static

Definition at line 609 of file mempool.cpp.

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

◆ getmempoolinfo()

RPCHelpMan getmempoolinfo ( )
static

Definition at line 1057 of file mempool.cpp.

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

◆ getorphantxs()

RPCHelpMan getorphantxs ( )
static

Definition at line 1223 of file mempool.cpp.

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

◆ getprivatebroadcastinfo()

RPCHelpMan getprivatebroadcastinfo ( )
static

Definition at line 142 of file mempool.cpp.

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

◆ getrawmempool()

RPCHelpMan getrawmempool ( )
static

Definition at line 652 of file mempool.cpp.

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

◆ gettxspendingprevout()

RPCHelpMan gettxspendingprevout ( )
static

Definition at line 897 of file mempool.cpp.

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

◆ importmempool()

RPCHelpMan importmempool ( )
static

Definition at line 1093 of file mempool.cpp.

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

◆ MempoolEntryDescription()

std::vector< RPCResult > MempoolEntryDescription ( )
static

Definition at line 431 of file mempool.cpp.

Here is the caller graph for this function:

◆ MempoolInfoToJSON()

UniValue MempoolInfoToJSON ( const CTxMemPool & pool)

Mempool information to JSON.

Definition at line 1033 of file mempool.cpp.

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

◆ MempoolPath()

Definition at line 18 of file mempool_persist_args.cpp.

Here is the caller graph for this function:

◆ MempoolToJSON()

UniValue MempoolToJSON ( const CTxMemPool & pool,
bool verbose,
bool include_mempool_sequence )

Mempool to JSON.

Definition at line 571 of file mempool.cpp.

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

◆ OrphanDescription()

std::vector< RPCResult > OrphanDescription ( )
static

Definition at line 1192 of file mempool.cpp.

Here is the caller graph for this function:

◆ OrphanToJSON()

UniValue OrphanToJSON ( const node::TxOrphanage::OrphanInfo & orphan)
static

Definition at line 1207 of file mempool.cpp.

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

◆ RegisterMempoolRPCCommands()

void RegisterMempoolRPCCommands ( CRPCTable & t)

Definition at line 1506 of file mempool.cpp.

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

◆ savemempool()

RPCHelpMan savemempool ( )
static

Definition at line 1154 of file mempool.cpp.

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

◆ sendrawtransaction()

RPCHelpMan sendrawtransaction ( )
static

Definition at line 47 of file mempool.cpp.

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

◆ submitpackage()

RPCHelpMan submitpackage ( )
static

Definition at line 1292 of file mempool.cpp.

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

◆ testmempoolaccept()

RPCHelpMan testmempoolaccept ( )
static

Definition at line 262 of file mempool.cpp.

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

◆ ToString()

template<typename T>
std::string util::ToString ( const T & t)

Locale-independent version of std::to_string.

Definition at line 246 of file string.h.

Here is the caller graph for this function:

Variable Documentation

◆ DEFAULT_MAX_BURN_AMOUNT

Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls.

By default, a transaction with a burn value higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxburnamount argument.

Definition at line 34 of file transaction.h.

◆ DEFAULT_MAX_RAW_TX_FEE_RATE

Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.

Also used by the GUI when broadcasting a completed PSBT. By default, a transaction with a fee rate higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxfeerate argument.

Definition at line 28 of file transaction.h.