Closes #3134 - Least Authority Issue E

CTxMemPool::check() does nothing when turned on, due to overflow.
This commit is contained in:
Simon
2018-04-10 20:45:36 -07:00
parent 079d9e6a57
commit a0c977ca61
2 changed files with 16 additions and 1 deletions

View File

@@ -161,7 +161,7 @@ public:
* check does nothing.
*/
void check(const CCoinsViewCache *pcoins) const;
void setSanityCheck(double dFrequency = 1.0) { nCheckFrequency = dFrequency * 4294967296.0; }
void setSanityCheck(double dFrequency = 1.0) { nCheckFrequency = static_cast<uint32_t>(dFrequency * 4294967295.0); }
bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate = true);
void remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive = false);
@@ -219,6 +219,11 @@ public:
bool ReadFeeEstimates(CAutoFile& filein);
size_t DynamicMemoryUsage() const;
/** Return nCheckFrequency */
uint32_t GetCheckFrequency() const {
return nCheckFrequency;
}
};
/**