We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfc63c4 commit 42e4e18Copy full SHA for 42e4e18
core/state/state_object.go
@@ -154,6 +154,9 @@ func (self *StateObject) Update() {
154
}
155
156
func (c *StateObject) AddBalance(amount *big.Int) {
157
+ if amount.Cmp(common.Big0) == 0 {
158
+ return
159
+ }
160
c.SetBalance(new(big.Int).Add(c.balance, amount))
161
162
if glog.V(logger.Core) {
@@ -162,6 +165,9 @@ func (c *StateObject) AddBalance(amount *big.Int) {
165
163
166
164
167
func (c *StateObject) SubBalance(amount *big.Int) {
168
169
170
171
c.SetBalance(new(big.Int).Sub(c.balance, amount))
172
173
0 commit comments