Fix previous commit

This commit is contained in:
Jack Grigg
2016-11-01 20:37:59 -05:00
parent cb7098317d
commit 22ee0efe25

View File

@@ -156,16 +156,15 @@ int printMetrics(size_t cols, int64_t nStart, bool mining)
int mined = 0; int mined = 0;
int orphaned = 0; int orphaned = 0;
CAmount immature {0};
CAmount mature {0};
{ {
LOCK2(cs_main, cs_metrics); LOCK2(cs_main, cs_metrics);
boost::strict_lock_ptr<std::list<uint256>> u = trackedBlocks.synchronize(); boost::strict_lock_ptr<std::list<uint256>> u = trackedBlocks.synchronize();
auto consensusParams = Params().GetConsensus(); auto consensusParams = Params().GetConsensus();
auto tipHeight = chainActive.Height(); auto tipHeight = chainActive.Height();
std::string units = Params().CurrencyUnits();
// Update orphans and calculate subsidies // Update orphans and calculate subsidies
CAmount immature {0};
CAmount mature {0};
for (std::list<uint256>::iterator it = u->begin(); it != u->end(); it++) { for (std::list<uint256>::iterator it = u->begin(); it != u->end(); it++) {
auto hash = *it; auto hash = *it;
if (mapBlockIndex.count(hash) > 0 && if (mapBlockIndex.count(hash) > 0 &&
@@ -190,6 +189,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining)
} }
if (mined > 0) { if (mined > 0) {
std::string units = Params().CurrencyUnits();
std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl; std::cout << "- " << strprintf(_("You have mined %d blocks!"), mined) << std::endl;
std::cout << " " std::cout << " "
<< strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"), << strprintf(_("Orphaned: %d blocks, Immature: %u %s, Mature: %u %s"),