diff options
| author | Pieter Wuille <[email protected]> | 2016-06-03 01:11:02 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-03 01:26:50 +0200 |
| commit | a82f03393a32842d49236e8666ee57805ca701f8 (patch) | |
| tree | 05461f94d40c52fa0f73dd85ae91026b24211871 /src/txmempool.h | |
| parent | Merge #7825: Prevent multiple calls to ExtractDestination (diff) | |
| parent | mapNextTx: use pointer as key, simplify value (diff) | |
| download | archived-discoin-a82f03393a32842d49236e8666ee57805ca701f8.tar.xz archived-discoin-a82f03393a32842d49236e8666ee57805ca701f8.zip | |
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.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 75cf0f4c1..3cf84159c 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. |