fix bug in CClaimTrie::getEffectiveAmountForClaim

This commit is contained in:
Victor Shyba 2018-04-21 17:56:27 -03:00 committed by Umpei Kay Kurokawa
parent 6b13bd1d45
commit 1d071a9998

View file

@ -534,9 +534,11 @@ CAmount CClaimTrie::getEffectiveAmountForClaim(const std::string& name, uint160
for (std::vector<CClaimValue>::iterator it=claims.claims.begin(); it!=claims.claims.end(); ++it) for (std::vector<CClaimValue>::iterator it=claims.claims.begin(); it!=claims.claims.end(); ++it)
{ {
if (it->claimId == claimId && it->nValidAtHeight < nCurrentHeight) if (it->claimId == claimId && it->nValidAtHeight < nCurrentHeight)
{
effectiveAmount += it->nAmount; effectiveAmount += it->nAmount;
claim_found = true; claim_found = true;
break; break;
}
} }
if (!claim_found) if (!claim_found)
return effectiveAmount; return effectiveAmount;