Skip to content

Commit

Permalink
add simple fix for negative number
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady committed Dec 1, 2020
1 parent 3f78cab commit bc0337e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/modules/balance_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,9 @@ func (b *BalanceStorage) removeHistoricalBalances(
}
}

if orphan {
// We don't update the pruned value when index is less
// than 0 because big.Int conversion doesn't support signed values.
if orphan || index < 0 {
return nil
}

Expand Down

0 comments on commit bc0337e

Please sign in to comment.