mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
TxMemPool: Change mapTx to a boost::multi_index_container
Indexes on: - Tx Hash - Fee Rate (fee-per-kb)
This commit is contained in:
committed by
Suhas Daftuar
parent
d5d1d2e65a
commit
34628a1807
@@ -181,10 +181,9 @@ UniValue mempoolToJSON(bool fVerbose = false)
|
||||
{
|
||||
LOCK(mempool.cs);
|
||||
UniValue o(UniValue::VOBJ);
|
||||
BOOST_FOREACH(const PAIRTYPE(uint256, CTxMemPoolEntry)& entry, mempool.mapTx)
|
||||
BOOST_FOREACH(const CTxMemPoolEntry& e, mempool.mapTx)
|
||||
{
|
||||
const uint256& hash = entry.first;
|
||||
const CTxMemPoolEntry& e = entry.second;
|
||||
const uint256& hash = e.GetTx().GetHash();
|
||||
UniValue info(UniValue::VOBJ);
|
||||
info.push_back(Pair("size", (int)e.GetTxSize()));
|
||||
info.push_back(Pair("fee", ValueFromAmount(e.GetFee())));
|
||||
|
||||
Reference in New Issue
Block a user