aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-06-03 01:11:02 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-03 01:26:50 +0200
commita82f03393a32842d49236e8666ee57805ca701f8 (patch)
tree05461f94d40c52fa0f73dd85ae91026b24211871 /src/txmempool.h
parentf972b04d63eb8af79ff3cec1dc561ed13dfa6053 (diff)
parent9805f4af7ecb6becf8a146bd845fb131ffa625c9 (diff)
Merge #7997: replace mapNextTx with slimmer setSpends
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 75cf0f4c12..3cf84159cc 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -11,6 +11,7 @@
#include "amount.h"
#include "coins.h"
+#include "indirectmap.h"
#include "primitives/transaction.h"
#include "sync.h"
@@ -306,20 +307,6 @@ struct ancestor_score {};
class CBlockPolicyEstimator;
-/** An inpoint - a combination of a transaction and an index n into its vin */
-class CInPoint
-{
-public:
- const CTransaction* ptx;
- uint32_t n;
-
- CInPoint() { SetNull(); }
- CInPoint(const CTransaction* ptxIn, uint32_t nIn) { ptx = ptxIn; n = nIn; }
- void SetNull() { ptx = NULL; n = (uint32_t) -1; }
- bool IsNull() const { return (ptx == NULL && n == (uint32_t) -1); }
- size_t DynamicMemoryUsage() const { return 0; }
-};
-
/**
* CTxMemPool stores valid-according-to-the-current-best-chain
* transactions that may be included in the next block.
@@ -478,7 +465,7 @@ private:
void UpdateChild(txiter entry, txiter child, bool add);
public:
- std::map<COutPoint, CInPoint> mapNextTx;
+ indirectmap<COutPoint, const CTransaction*> mapNextTx;
std::map<uint256, std::pair<double, CAmount> > mapDeltas;
/** Create a new CTxMemPool.