| 2020 | } |
| 2021 | |
| 2022 | static 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 | |
| 2051 | static RPCHelpMan preciousblock() |
| 2052 | { |
nothing calls this directly
no test coverage detected