Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
mempool.cpp File Reference
#include <rpc/mempool.h>
#include <rpc/register.h>
#include <common/args.h>
#include <consensus/amount.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <index/txospenderindex.h>
#include <net.h>
#include <net_processing.h>
#include <netaddress.h>
#include <netbase.h>
#include <node/mempool_persist.h>
#include <node/mempool_persist_args.h>
#include <node/transaction.h>
#include <node/txorphanage.h>
#include <node/types.h>
#include <policy/feerate.h>
#include <policy/packages.h>
#include <policy/policy.h>
#include <policy/rbf.h>
#include <primitives/transaction.h>
#include <rpc/protocol.h>
#include <rpc/request.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <script/script.h>
#include <sync.h>
#include <tinyformat.h>
#include <txgraph.h>
#include <txmempool.h>
#include <uint256.h>
#include <univalue.h>
#include <util/check.h>
#include <util/expected.h>
#include <util/feefrac.h>
#include <util/fs.h>
#include <util/moneystr.h>
#include <util/string.h>
#include <util/time.h>
#include <util/vector.h>
#include <validation.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <list>
#include <map>
#include <memory>
#include <optional>
#include <ranges>
#include <set>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  node

Enumerations

enum class  TransactionError

Functions

static RPCMethod sendrawtransaction ()
static RPCMethod getprivatebroadcastinfo ()
static RPCMethod abortprivatebroadcast ()
static RPCMethod testmempoolaccept ()
static std::vector< RPCResult > ClusterDescription ()
static std::vector< RPCResult > MempoolEntryDescription ()
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 RPCMethod getmempoolfeeratediagram ()
static RPCMethod getrawmempool ()
static RPCMethod getmempoolancestors ()
static RPCMethod getmempooldescendants ()
static RPCMethod getmempoolcluster ()
static RPCMethod getmempoolentry ()
static RPCMethod gettxspendingprevout ()
UniValue MempoolInfoToJSON (const CTxMemPool &pool)
 Mempool information to JSON.
static RPCMethod getmempoolinfo ()
static RPCMethod importmempool ()
static RPCMethod savemempool ()
static std::vector< RPCResult > OrphanDescription ()
static UniValue OrphanToJSON (const node::TxOrphanage::OrphanInfo &orphan)
static RPCMethod getorphantxs ()
static RPCMethod 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

constexpr CAmount DEFAULT_MAX_BURN_AMOUNT
 Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls.
constexpr 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 19 of file types.h.

Function Documentation

◆ abortprivatebroadcast()

RPCMethod abortprivatebroadcast ( )
static

Definition at line 254 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 526 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 471 of file mempool.cpp.

Here is the call graph for this function:
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 539 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.

◆ entryToJSON()

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

Definition at line 573 of file mempool.cpp.

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

◆ getmempoolancestors()

RPCMethod getmempoolancestors ( )
static

Definition at line 771 of file mempool.cpp.

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

◆ getmempoolcluster()

RPCMethod getmempoolcluster ( )
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:

◆ getmempooldescendants()

RPCMethod getmempooldescendants ( )
static

Definition at line 832 of file mempool.cpp.

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

◆ getmempoolentry()

RPCMethod getmempoolentry ( )
static

Definition at line 932 of file mempool.cpp.

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

◆ getmempoolfeeratediagram()

RPCMethod getmempoolfeeratediagram ( )
static

Definition at line 677 of file mempool.cpp.

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

◆ getmempoolinfo()

RPCMethod getmempoolinfo ( )
static

Definition at line 1134 of file mempool.cpp.

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

◆ getorphantxs()

RPCMethod getorphantxs ( )
static

Definition at line 1308 of file mempool.cpp.

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

◆ getprivatebroadcastinfo()

RPCMethod getprivatebroadcastinfo ( )
static

Definition at line 179 of file mempool.cpp.

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

◆ getrawmempool()

RPCMethod getrawmempool ( )
static

Definition at line 720 of file mempool.cpp.

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

◆ gettxspendingprevout()

RPCMethod gettxspendingprevout ( )
static

Definition at line 965 of file mempool.cpp.

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

◆ importmempool()

RPCMethod importmempool ( )
static

Definition at line 1176 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 489 of file mempool.cpp.

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

◆ MempoolInfoToJSON()

UniValue MempoolInfoToJSON ( const CTxMemPool & pool)

Mempool information to JSON.

Definition at line 1108 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.

◆ MempoolToJSON()

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

Mempool to JSON.

Definition at line 639 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 1275 of file mempool.cpp.

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

◆ OrphanToJSON()

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

Definition at line 1291 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 1596 of file mempool.cpp.

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

◆ savemempool()

RPCMethod savemempool ( )
static

Definition at line 1237 of file mempool.cpp.

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

◆ sendrawtransaction()

RPCMethod sendrawtransaction ( )
static

Definition at line 79 of file mempool.cpp.

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

◆ submitpackage()

RPCMethod submitpackage ( )
static

Definition at line 1377 of file mempool.cpp.

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

◆ testmempoolaccept()

RPCMethod testmempoolaccept ( )
static

Definition at line 314 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 250 of file string.h.

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.