Support -checkmempool=N, which runs checks on average once every N transactions
This commit is contained in:
committed by
Jack Grigg
parent
e328fa32b3
commit
934fd19744
@@ -118,7 +118,7 @@ public:
|
||||
class CTxMemPool
|
||||
{
|
||||
private:
|
||||
bool fSanityCheck; //! Normally false, true if -checkmempool or -regtest
|
||||
uint32_t nCheckFrequency; //! Value n means that n times in 2^32 we check.
|
||||
unsigned int nTransactionsUpdated;
|
||||
CBlockPolicyEstimator* minerPolicyEstimator;
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
* check does nothing.
|
||||
*/
|
||||
void check(const CCoinsViewCache *pcoins) const;
|
||||
void setSanityCheck(bool _fSanityCheck) { fSanityCheck = _fSanityCheck; }
|
||||
void setSanityCheck(double dFrequency = 1.0) { nCheckFrequency = dFrequency * 4294967296.0; }
|
||||
|
||||
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate = true);
|
||||
void remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive = false);
|
||||
|
||||
Reference in New Issue
Block a user