fa362064e3 rpc: Return total fee in mempool (MarcoFalke)
Pull request description:
This avoids having to loop over the whole mempool to query each entry's fee
ACKs for top commit:
achow101:
ACK fa362064e3
glozow:
ACK fa362064e3🧸
jnewbery:
ACK fa362064e3
Tree-SHA512: e2fa1664df39c9e187f9229fc35764ccf436f6f75889c5a206d34fff473fc21efbf2bb143f4ca7895c27659218c22884d0ec4195e7a536a5a96973fc9dd82d08
{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"},
{RPCResult::Type::NUM,"usage","Total memory usage for the mempool"},
{RPCResult::Type::STR_AMOUNT,"total_fee","Total fees for the mempool in "+CURRENCY_UNIT+", ignoring modified fees through prioritizetransaction"},
{RPCResult::Type::NUM,"maxmempool","Maximum memory usage for the mempool"},
{RPCResult::Type::STR_AMOUNT,"mempoolminfee","Minimum fee rate in "+CURRENCY_UNIT+"/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee"},
{RPCResult::Type::STR_AMOUNT,"minrelaytxfee","Current minimum relay fee for transactions"},
std::atomic<unsignedint>nTransactionsUpdated{0};//!< Used by getblocktemplate to trigger CreateNewBlock() invocation
CBlockPolicyEstimator*minerPolicyEstimator;
uint64_ttotalTxSize;//!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141.
uint64_tcachedInnerUsage;//!< sum of dynamic memory usage of all the map elements (NOT the maps themselves)
uint64_ttotalTxSizeGUARDED_BY(cs);//!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141.
CAmountm_total_feeGUARDED_BY(cs);//!< sum of all mempool tx's fees (NOT modified fee)
uint64_tcachedInnerUsageGUARDED_BY(cs);//!< sum of dynamic memory usage of all the map elements (NOT the maps themselves)