diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -497,7 +497,7 @@ //! Value n means that 1 times in n we check. const int m_check_ratio; //! Used by getblocktemplate to trigger CreateNewBlock() invocation - std::atomic nTransactionsUpdated; + std::atomic nTransactionsUpdated{0}; //! sum of all mempool tx's sizes. uint64_t totalTxSize; @@ -509,8 +509,8 @@ mutable bool blockSinceLastRollingFeeBump; //! minimum fee to get into the pool, decreases exponentially mutable double rollingMinimumFeeRate; - 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 diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -399,9 +399,7 @@ assert(int(nSigOpCountWithAncestors) >= 0); } -CTxMemPool::CTxMemPool(int check_ratio) - : m_check_ratio(check_ratio), nTransactionsUpdated(0), m_epoch(0), - m_has_epoch_guard(false) { +CTxMemPool::CTxMemPool(int check_ratio) : m_check_ratio(check_ratio) { // lock free clear _clear(); }