mirror of
https://git.hush.is/hush/hush3.git
synced 2025-12-04 00:04:59 -05:00
Ensure that no tracked blocks are skipped during orphan detection
This commit is contained in:
parent
22ee0efe25
commit
73a439185d
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user