aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-08-28 15:28:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-08-28 15:30:50 +0200
commit8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f (patch)
treeef7fed85ea38dde8929f15e02ff39c7e7b40da4a /src/txmempool.cpp
parent11a899445edf3e07317eb312d3c1d9c71c06f618 (diff)
downloadbitcoin-8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f.tar.xz
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.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp7
1 files changed, 5 insertions, 2 deletions
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