aboutsummaryrefslogtreecommitdiff
path: root/src/policy/fees.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2017-06-09 12:58:02 -0700
committerPieter Wuille <[email protected]>2017-06-09 13:09:24 -0700
commit76f268b9bd1b69eb7784c5324abbb67f3e395b97 (patch)
tree3871ee223344c98c30939645dfa5fd4ff9128d7e /src/policy/fees.cpp
parentMerge #10545: Use list initialization (C++11) for maps/vectors instead of boo... (diff)
parentLimit variable scope (diff)
downloaddiscoin-76f268b9bd1b69eb7784c5324abbb67f3e395b97.tar.xz
discoin-76f268b9bd1b69eb7784c5324abbb67f3e395b97.zip
Merge #10521: Limit variable scope
90593ed92 Limit variable scope (practicalswift) Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
Diffstat (limited to 'src/policy/fees.cpp')
-rw-r--r--src/policy/fees.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp
index 7a9af5edc..3c3a2fb65 100644
--- a/src/policy/fees.cpp
+++ b/src/policy/fees.cpp
@@ -855,13 +855,13 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
try {
LOCK(cs_feeEstimator);
int nVersionRequired, nVersionThatWrote;
- unsigned int nFileBestSeenHeight, nFileHistoricalFirst, nFileHistoricalBest;
filein >> nVersionRequired >> nVersionThatWrote;
if (nVersionRequired > CLIENT_VERSION)
return error("CBlockPolicyEstimator::Read(): up-version (%d) fee estimate file", nVersionRequired);
// Read fee estimates file into temporary variables so existing data
// structures aren't corrupted if there is an exception.
+ unsigned int nFileBestSeenHeight;
filein >> nFileBestSeenHeight;
if (nVersionThatWrote < 149900) {
@@ -890,6 +890,7 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
}
}
else { // nVersionThatWrote >= 149900
+ unsigned int nFileHistoricalFirst, nFileHistoricalBest;
filein >> nFileHistoricalFirst >> nFileHistoricalBest;
if (nFileHistoricalFirst > nFileHistoricalBest || nFileHistoricalBest > nFileBestSeenHeight) {
throw std::runtime_error("Corrupt estimates file. Historical block range for estimates is invalid");