Skip to content

Commit

Permalink
[state] remove unnecessary new(big.Int) (#3778)
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie authored Feb 17, 2023
1 parent 79b6052 commit 9117fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (st *Account) AddBalance(amount *big.Int) error {
return errors.Wrapf(ErrInvalidAmount, "amount %s shouldn't be negative", amount.String())
}
if st.Balance != nil {
st.Balance = new(big.Int).Add(st.Balance, amount)
st.Balance.Add(st.Balance, amount)
} else {
st.Balance = new(big.Int).Set(amount)
}
Expand Down

0 comments on commit 9117fb4

Please sign in to comment.