diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2015-10-28 02:24:44 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2015-10-28 02:25:06 +0100 |
commit | e06c14fb59ee493da5283819420d949a14304ca7 (patch) | |
tree | 2d1b41bd1895a3e59001f44b6eda249bdf5c2712 /src/txmempool.h | |
parent | 8756c986420ccd8302c396e0db8f5434dd41c57a (diff) | |
parent | ab1f56072a796b0ff039d6690c6ac929dbcbf243 (diff) |
Merge pull request #6776
ab1f560 Support -checkmempool=N, which runs checks on average once every N transactions (Pieter Wuille)
Diffstat (limited to 'src/txmempool.h')
-rw-r--r-- | src/txmempool.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index dedc7ba72c..6aa5f6d77c 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -278,7 +278,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; @@ -360,7 +360,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; } // addUnchecked must updated state for all ancestors of a given transaction, // to track size/count of descendant transactions. First version of |