aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-10-07 23:34:55 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2015-10-20 18:59:08 +0200
commitab1f56072a796b0ff039d6690c6ac929dbcbf243 (patch)
treebd16f4d42d3a075a41879dbaef2674a25a7442e2 /src/txmempool.h
parentc6de5cc88614f587ae2d0e360536412407e02836 (diff)
Support -checkmempool=N, which runs checks on average once every N transactions
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index c0eef0dd22..7d83decb55 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -277,7 +277,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;
@@ -338,7 +338,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