From 8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 28 Aug 2014 15:28:57 +0200 Subject: Fix a few "Uninitialized scalar field" warnings Fix a few warnings reported by Coverity. None of these is critical, but making sure that class fields are initialized can avoid heisenbugs. --- src/txmempool.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/txmempool.cpp') diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 8af1f1c91b..238d5bab16 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -11,7 +11,8 @@ using namespace std; -CTxMemPoolEntry::CTxMemPoolEntry() +CTxMemPoolEntry::CTxMemPoolEntry(): + nFee(0), nTxSize(0), nTime(0), dPriority(0.0) { nHeight = MEMPOOL_HEIGHT; } @@ -345,7 +346,9 @@ public: }; -CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) : minRelayFee(_minRelayFee) +CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) : + nTransactionsUpdated(0), + minRelayFee(_minRelayFee) { // Sanity checks off by default for performance, because otherwise // accepting transactions becomes O(N^2) where N is the number -- cgit v1.2.3