MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / mempoolInfoToJSON

Function mempoolInfoToJSON

src/rpc/blockchain.cpp:1454–1466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452}
1453
1454UniValue 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
1468static UniValue getmempoolinfo(const JSONRPCRequest& request)
1469{

Callers 2

rest_mempool_infoFunction · 0.85
getmempoolinfoFunction · 0.85

Calls 9

ValueFromAmountFunction · 0.85
maxFunction · 0.85
GetTotalTxSizeMethod · 0.80
GetFeePerKMethod · 0.80
GetMinFeeMethod · 0.80
pushKVMethod · 0.45
sizeMethod · 0.45
DynamicMemoryUsageMethod · 0.45
GetArgMethod · 0.45

Tested by

no test coverage detected