| 1452 | } |
| 1453 | |
| 1454 | UniValue mempoolInfoToJSON() |
| 1455 | { |
| 1456 | UniValue ret(UniValue::VOBJ); |
| 1457 | ret.pushKV("size", (int64_t) mempool.size()); |
| 1458 | ret.pushKV("bytes", (int64_t) mempool.GetTotalTxSize()); |
| 1459 | ret.pushKV("usage", (int64_t) mempool.DynamicMemoryUsage()); |
| 1460 | size_t maxmempool = gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; |
| 1461 | ret.pushKV("maxmempool", (int64_t) maxmempool); |
| 1462 | ret.pushKV("mempoolminfee", ValueFromAmount(std::max(mempool.GetMinFee(maxmempool), ::minRelayTxFee).GetFeePerK())); |
| 1463 | ret.pushKV("minrelaytxfee", ValueFromAmount(::minRelayTxFee.GetFeePerK())); |
| 1464 | |
| 1465 | return ret; |
| 1466 | } |
| 1467 | |
| 1468 | static UniValue getmempoolinfo(const JSONRPCRequest& request) |
| 1469 | { |
no test coverage detected