aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/state/state_object.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/state/state_object.go b/core/state/state_object.go
index 20da1006f..7a7f6c04b 100644
--- a/core/state/state_object.go
+++ b/core/state/state_object.go
@@ -154,6 +154,9 @@ func (self *StateObject) Update() {
}
func (c *StateObject) AddBalance(amount *big.Int) {
+ if amount.Cmp(common.Big0) == 0 {
+ return
+ }
c.SetBalance(new(big.Int).Add(c.balance, amount))
if glog.V(logger.Core) {
@@ -162,6 +165,9 @@ func (c *StateObject) AddBalance(amount *big.Int) {
}
func (c *StateObject) SubBalance(amount *big.Int) {
+ if amount.Cmp(common.Big0) == 0 {
+ return
+ }
c.SetBalance(new(big.Int).Sub(c.balance, amount))
if glog.V(logger.Core) {