From 22ee0efe25f9a1c402ec3f4561319e6507b0d266 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 1 Nov 2016 20:37:59 -0500 Subject: [PATCH] Fix previous commit --- src/metrics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metrics.cpp b/src/metrics.cpp index 34896a6b1..6b047bbe8 100644 --- a/src/metrics.cpp +++ b/src/metrics.cpp @@ -156,16 +156,15 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) int mined = 0; int orphaned = 0; + CAmount immature {0}; + CAmount mature {0}; { LOCK2(cs_main, cs_metrics); boost::strict_lock_ptr> u = trackedBlocks.synchronize(); auto consensusParams = Params().GetConsensus(); auto tipHeight = chainActive.Height(); - std::string units = Params().CurrencyUnits(); // Update orphans and calculate subsidies - CAmount immature {0}; - CAmount mature {0}; for (std::list::iterator it = u->begin(); it != u->end(); it++) { auto hash = *it; if (mapBlockIndex.count(hash) > 0 && @@ -190,6 +189,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) } if (mined > 0) { + std::string units = Params().CurrencyUnits(); std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl; std::cout << " " << strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"),