Browse Source

Track (and define) ::minRelayTxFee in CTxMemPool

0.13
Matt Corallo 9 years ago
parent
commit
e8bcdce8a2
  1. 5
      src/txmempool.cpp
  2. 9
      src/txmempool.h

5
src/txmempool.cpp

@ -305,7 +305,7 @@ void CTxMemPoolEntry::UpdateState(int64_t modifySize, CAmount modifyFee, int64_t
} }
} }
CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) : CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) :
nTransactionsUpdated(0) nTransactionsUpdated(0)
{ {
// Sanity checks off by default for performance, because otherwise // Sanity checks off by default for performance, because otherwise
@ -313,7 +313,8 @@ CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) :
// of transactions in the pool // of transactions in the pool
fSanityCheck = false; fSanityCheck = false;
minerPolicyEstimator = new CBlockPolicyEstimator(_minRelayFee); minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee);
minReasonableRelayFee = _minReasonableRelayFee;
} }
CTxMemPool::~CTxMemPool() CTxMemPool::~CTxMemPool()

9
src/txmempool.h

@ -285,6 +285,8 @@ private:
uint64_t totalTxSize; //! sum of all mempool tx' byte sizes uint64_t totalTxSize; //! sum of all mempool tx' byte sizes
uint64_t cachedInnerUsage; //! sum of dynamic memory usage of all the map elements (NOT the maps themselves) uint64_t cachedInnerUsage; //! sum of dynamic memory usage of all the map elements (NOT the maps themselves)
CFeeRate minReasonableRelayFee;
public: public:
typedef boost::multi_index_container< typedef boost::multi_index_container<
CTxMemPoolEntry, CTxMemPoolEntry,
@ -334,7 +336,12 @@ public:
std::map<COutPoint, CInPoint> mapNextTx; std::map<COutPoint, CInPoint> mapNextTx;
std::map<uint256, std::pair<double, CAmount> > mapDeltas; std::map<uint256, std::pair<double, CAmount> > mapDeltas;
CTxMemPool(const CFeeRate& _minRelayFee); /** Create a new CTxMemPool.
* minReasonableRelayFee should be a feerate which is, roughly, somewhere
* around what it "costs" to relay a transaction around the network and
* below which we would reasonably say a transaction has 0-effective-fee.
*/
CTxMemPool(const CFeeRate& _minReasonableRelayFee);
~CTxMemPool(); ~CTxMemPool();
/** /**

Loading…
Cancel
Save