MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / getmempoolinfo

Function getmempoolinfo

src/rpc/mempool.cpp:1085–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1083}
1084
1085static RPCMethod getmempoolinfo()
1086{
1087 return RPCMethod{"getmempoolinfo",
1088 "Returns details on the active state of the TX memory pool.",
1089 {},
1090 RPCResult{
1091 RPCResult::Type::OBJ, "", "",
1092 [](){
1093 std::vector<RPCResult> list = {
1094 {RPCResult::Type::BOOL, "loaded", "True if the initial load attempt of the persisted mempool finished"},
1095 {RPCResult::Type::NUM, "size", "Current tx count"},
1096 {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"},
1097 {RPCResult::Type::NUM, "usage", "Total memory usage for the mempool"},
1098 {RPCResult::Type::STR_AMOUNT, "total_fee", "Total fees for the mempool in " + CURRENCY_UNIT + ", ignoring modified fees through prioritisetransaction"},
1099 {RPCResult::Type::NUM, "maxmempool", "Maximum memory usage for the mempool"},
1100 {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"},
1101 {RPCResult::Type::STR_AMOUNT, "minrelaytxfee", "Current minimum relay fee for transactions"},
1102 {RPCResult::Type::NUM, "incrementalrelayfee", "minimum fee rate increment for mempool limiting or replacement in " + CURRENCY_UNIT + "/kvB"},
1103 {RPCResult::Type::NUM, "unbroadcastcount", "Current number of transactions that haven't passed initial broadcast yet"},
1104 {RPCResult::Type::BOOL, "permitbaremultisig", "True if the mempool accepts transactions with bare multisig outputs"},
1105 {RPCResult::Type::NUM, "maxdatacarriersize", "Maximum number of bytes that can be used by OP_RETURN outputs in the mempool"},
1106 {RPCResult::Type::NUM, "limitclustercount", "Maximum number of transactions that can be in a cluster (configured by -limitclustercount)"},
1107 {RPCResult::Type::NUM, "limitclustersize", "Maximum size of a cluster in virtual bytes (configured by -limitclustersize)"},
1108 {RPCResult::Type::BOOL, "optimal", "If the mempool is in a known-optimal transaction ordering"},
1109 };
1110 if (IsDeprecatedRPCEnabled("fullrbf")) {
1111 list.emplace_back(RPCResult::Type::BOOL, "fullrbf", "True if the mempool accepts RBF without replaceability signaling inspection (DEPRECATED)");
1112 }
1113 return list;
1114 }()
1115 },
1116 RPCExamples{
1117 HelpExampleCli("getmempoolinfo", "")
1118 + HelpExampleRpc("getmempoolinfo", "")
1119 },
1120 [](const RPCMethod& self, const JSONRPCRequest& request) -> UniValue
1121{
1122 return MempoolInfoToJSON(EnsureAnyMemPool(request.context));
1123},
1124 };
1125}
1126
1127static RPCMethod importmempool()
1128{

Callers

nothing calls this directly

Calls 5

IsDeprecatedRPCEnabledFunction · 0.85
HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
MempoolInfoToJSONFunction · 0.85
emplace_backMethod · 0.45

Tested by

no test coverage detected