Browse Source
Ensure that no tracked blocks are skipped during orphan detection
pull/4/head
Jack Grigg
8 years ago
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
1 changed files with
3 additions and
1 deletions
-
src/metrics.cpp
|
|
@ -165,7 +165,8 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) |
|
|
|
auto tipHeight = chainActive.Height(); |
|
|
|
|
|
|
|
// Update orphans and calculate subsidies
|
|
|
|
for (std::list<uint256>::iterator it = u->begin(); it != u->end(); it++) { |
|
|
|
std::list<uint256>::iterator it = u->begin(); |
|
|
|
while (it != u->end()) { |
|
|
|
auto hash = *it; |
|
|
|
if (mapBlockIndex.count(hash) > 0 && |
|
|
|
chainActive.Contains(mapBlockIndex[hash])) { |
|
|
@ -179,6 +180,7 @@ int printMetrics(size_t cols, int64_t nStart, bool mining) |
|
|
|
} else { |
|
|
|
mature += subsidy; |
|
|
|
} |
|
|
|
it++; |
|
|
|
} else { |
|
|
|
it = u->erase(it); |
|
|
|
} |
|
|
|