From b1c1a32b3a0309bf65aa59e8e43c83c566695ae5 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 20 Oct 2016 11:17:17 -0700 Subject: [PATCH] Fixes CID 1352698 uninitialized scalar field. --- src/policy/fees.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/policy/fees.h b/src/policy/fees.h index 15577d128..d37d4b184 100644 --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -66,6 +66,9 @@ class CTxMemPoolEntry; * they've been outstanding. */ +/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */ +static const double DEFAULT_DECAY = .998; + /** * We will instantiate two instances of this class, one to track transactions * that were included in a block due to fee, and one for tx's included due to @@ -105,7 +108,7 @@ private: // Combine the total value with the tx counts to calculate the avg fee/priority per bucket std::string dataTypeString; - double decay; + double decay = DEFAULT_DECAY; // Mempool counts of outstanding transactions // For each bucket X, track the number of transactions in the mempool @@ -179,9 +182,6 @@ public: /** Track confirm delays up to 25 blocks, can't estimate beyond that */ static const unsigned int MAX_BLOCK_CONFIRMS = 25; -/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */ -static const double DEFAULT_DECAY = .998; - /** Require greater than 85% of X fee transactions to be confirmed within Y blocks for X to be big enough */ static const double MIN_SUCCESS_PCT = .85; static const double UNLIKELY_PCT = .5;