diff options
| author | practicalswift <[email protected]> | 2017-11-16 09:54:10 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-05-05 16:50:58 +0200 |
| commit | 0e2dfa8a65091504b27a0b9d66ee4415fe2b7b37 (patch) | |
| tree | 35a817417141c5fd5b4667a1710965e26d45bba7 | |
| parent | Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins) (diff) | |
| download | discoin-0e2dfa8a65091504b27a0b9d66ee4415fe2b7b37.tar.xz discoin-0e2dfa8a65091504b27a0b9d66ee4415fe2b7b37.zip | |
Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)
* writing variable 'nCheckFrequency' requires holding mutex 'cs'
| -rw-r--r-- | src/txmempool.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index 3f9fb4850..4d06d5bcf 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -529,7 +529,7 @@ public: * check does nothing. */ void check(const CCoinsViewCache *pcoins) const; - void setSanityCheck(double dFrequency = 1.0) { nCheckFrequency = static_cast<uint32_t>(dFrequency * 4294967295.0); } + void setSanityCheck(double dFrequency = 1.0) { LOCK(cs); nCheckFrequency = static_cast<uint32_t>(dFrequency * 4294967295.0); } // addUnchecked must updated state for all ancestors of a given transaction, // to track size/count of descendant transactions. First version of |