diff options
| author | Ashley Holman <[email protected]> | 2015-06-24 03:32:20 -0500 |
|---|---|---|
| committer | Suhas Daftuar <[email protected]> | 2015-09-19 13:22:40 -0400 |
| commit | 34628a18070064e75b35f28fd6a43d5c23832eb8 (patch) | |
| tree | e73c13d25d04212b5bbbb5b0c3829421f7616d6b /src/rpcblockchain.cpp | |
| parent | Merge pull request #6692 (diff) | |
| download | discoin-34628a18070064e75b35f28fd6a43d5c23832eb8.tar.xz discoin-34628a18070064e75b35f28fd6a43d5c23832eb8.zip | |
TxMemPool: Change mapTx to a boost::multi_index_container
Indexes on:
- Tx Hash
- Fee Rate (fee-per-kb)
Diffstat (limited to 'src/rpcblockchain.cpp')
| -rw-r--r-- | src/rpcblockchain.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index e6751de96..a1da31b61 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -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()))); |