MCPcopy Create free account
hub / github.com/ElementsProject/elements / getmempoolinfo

Function getmempoolinfo

src/rpc/blockchain.cpp:2022–2049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2020}
2021
2022static RPCHelpMan getmempoolinfo()
2023{
2024 return RPCHelpMan{"getmempoolinfo",
2025 "\nReturns details on the active state of the TX memory pool.\n",
2026 {},
2027 RPCResult{
2028 RPCResult::Type::OBJ, "", "",
2029 {
2030 {RPCResult::Type::BOOL, "loaded", "True if the mempool is fully loaded"},
2031 {RPCResult::Type::NUM, "size", "Current tx count"},
2032 {RPCResult::Type::NUM, "bytes", "Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted"},
2033 {RPCResult::Type::NUM, "usage", "Total memory usage for the mempool"},
2034 {RPCResult::Type::STR_AMOUNT, "total_fee", "Total fees for the mempool in " + CURRENCY_UNIT + ", ignoring modified fees through prioritisetransaction"},
2035 {RPCResult::Type::NUM, "maxmempool", "Maximum memory usage for the mempool"},
2036 {RPCResult::Type::STR_AMOUNT, "mempoolminfee", "Minimum fee rate in " + CURRENCY_UNIT + "/kvB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"},
2037 {RPCResult::Type::STR_AMOUNT, "minrelaytxfee", "Current minimum relay fee for transactions"},
2038 {RPCResult::Type::NUM, "unbroadcastcount", "Current number of transactions that haven't passed initial broadcast yet"}
2039 }},
2040 RPCExamples{
2041 HelpExampleCli("getmempoolinfo", "")
2042 + HelpExampleRpc("getmempoolinfo", "")
2043 },
2044 [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
2045{
2046 return MempoolInfoToJSON(EnsureAnyMemPool(request.context));
2047},
2048 };
2049}
2050
2051static RPCHelpMan preciousblock()
2052{

Callers

nothing calls this directly

Calls 3

HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
MempoolInfoToJSONFunction · 0.85

Tested by

no test coverage detected