aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-09-26 13:55:23 +0800
committerGitHub <noreply@github.com>2016-09-26 13:55:23 +0800
commit6999f1da6b0f8c93b40aa90250e55166018a11a5 (patch)
treee499224f716892d2e7f2e8152a6f104fbc3d65dc /core
parent9bdbaf459a9dcddfd9df22c2c47056571a6a0050 (diff)
parent95bfedd5995693746434d95e0d49953ef42f5c06 (diff)
downloadgo-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar.gz
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar.bz2
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar.lz
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar.xz
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.tar.zst
go-tangerine-6999f1da6b0f8c93b40aa90250e55166018a11a5.zip
Merge pull request #3036 from karalabe/release/1.4
Geth 1.4.13
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) {