aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 3e1d387975..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.
@@ -602,6 +589,7 @@ public:
}
bool lookup(uint256 hash, CTransaction& result) const;
+ bool lookup(uint256 hash, CTransaction& result, int64_t& time) const;
bool lookupFeeRate(const uint256& hash, CFeeRate& feeRate) const;
/** Estimate fee rate needed to get into the next nBlocks