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.
This commit is contained in:
Wladimir J. van der Laan
2014-08-28 15:28:57 +02:00
parent 11a899445e
commit 8bdd2877c4
6 changed files with 11 additions and 7 deletions

View File

@@ -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