diff --git a/src/txmempool.cpp b/src/txmempool.cpp index ca7021443e..d18182c07d 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -332,7 +332,7 @@ void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, CAmount modifyFee, } CTxMemPool::CTxMemPool(CBlockPolicyEstimator* estimator, int check_ratio) - : m_check_ratio(check_ratio), nTransactionsUpdated(0), minerPolicyEstimator(estimator), m_epoch(0), m_has_epoch_guard(false) + : m_check_ratio(check_ratio), minerPolicyEstimator(estimator) { _clear(); //lock free clear } diff --git a/src/txmempool.h b/src/txmempool.h index da071576ac..78ad62aae6 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -489,7 +489,7 @@ class CTxMemPool { private: const int m_check_ratio; //!< Value n means that 1 times in n we check. - std::atomic nTransactionsUpdated; //!< Used by getblocktemplate to trigger CreateNewBlock() invocation + std::atomic nTransactionsUpdated{0}; //!< Used by getblocktemplate to trigger CreateNewBlock() invocation CBlockPolicyEstimator* minerPolicyEstimator; uint64_t totalTxSize; //!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141. @@ -498,8 +498,8 @@ private: mutable int64_t lastRollingFeeUpdate; mutable bool blockSinceLastRollingFeeBump; mutable double rollingMinimumFeeRate; //!< minimum fee to get into the pool, decreases exponentially - mutable uint64_t m_epoch; - mutable bool m_has_epoch_guard; + mutable uint64_t m_epoch{0}; + mutable bool m_has_epoch_guard{false}; // In-memory counter for external mempool tracking purposes. // This number is incremented once every time a transaction