Better use copies on iterate claim and support re-add
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
parent
c02b04f120
commit
e5c8b6b8ff
1 changed files with 2 additions and 2 deletions
|
@ -166,7 +166,7 @@ bool CClaimTrieCacheNormalizationFork::normalizeAllNamesInTrieIfNecessary(insert
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto supports = getSupportsForName(it.key());
|
auto supports = getSupportsForName(it.key());
|
||||||
for (auto& support : supports) {
|
for (auto support : supports) {
|
||||||
// if it's already going to expire just skip it
|
// if it's already going to expire just skip it
|
||||||
if (support.nHeight + expirationTime() <= nNextHeight)
|
if (support.nHeight + expirationTime() <= nNextHeight)
|
||||||
continue;
|
continue;
|
||||||
|
@ -183,7 +183,7 @@ bool CClaimTrieCacheNormalizationFork::normalizeAllNamesInTrieIfNecessary(insert
|
||||||
if (!cached || cached->empty())
|
if (!cached || cached->empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (auto& claim : it->claims) {
|
for (auto claim : it->claims) {
|
||||||
if (claim.nHeight + expirationTime() <= nNextHeight)
|
if (claim.nHeight + expirationTime() <= nNextHeight)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue