aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-06-14 23:59:03 -0700
committerMatt Corallo <git@bluematt.me>2016-06-19 23:06:55 -0700
commit811902649d6aaddd886cb39b83aa69adf7b441bd (patch)
tree86410076db666aa134ff738b98d5ef260763ab3d /src/txmempool.h
parent678ee9793f6279c07b57c22c3cce983ab1e069d0 (diff)
downloadbitcoin-811902649d6aaddd886cb39b83aa69adf7b441bd.tar.xz
Provide a flat list of txid/terators to txn in CTxMemPool
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index f0e9b2e2c6..d6d0d72ff5 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -150,6 +150,8 @@ public:
uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; }
CAmount GetModFeesWithAncestors() const { return nModFeesWithAncestors; }
unsigned int GetSigOpCountWithAncestors() const { return nSigOpCountWithAncestors; }
+
+ mutable size_t vTxHashesIdx; //!< Index in mempool's vTxHashes
};
// Helpers for modifying CTxMemPool::mapTx, which is a boost multi_index.
@@ -457,7 +459,10 @@ public:
mutable CCriticalSection cs;
indexed_transaction_set mapTx;
+
typedef indexed_transaction_set::nth_index<0>::type::iterator txiter;
+ std::vector<std::pair<uint256, txiter> > vTxHashes; //!< All tx hashes/entries in mapTx, in random order
+
struct CompareIteratorByHash {
bool operator()(const txiter &a, const txiter &b) const {
return a->GetTx().GetHash() < b->GetTx().GetHash();