From 42e4e1866728de5725cfdfbcb612b42f3e569c2a Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 26 Sep 2016 01:25:50 -0400 Subject: [PATCH 1/2] [release 1.4.12] core: short-circuit balance change if zero value (cherry picked from commit 25ed5feddadea8201974bfacb2a57d060b697acb) --- core/state/state_object.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/state/state_object.go b/core/state/state_object.go index 20da1006fc..7a7f6c04bd 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) { From 95bfedd5995693746434d95e0d49953ef42f5c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 26 Sep 2016 08:49:42 +0300 Subject: [PATCH 2/2] [release 1.4.12] VERSION, cmd/geth: bumped version 1.4.13 --- VERSION | 2 +- cmd/geth/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index f86e029880..acd81d7f2c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.12 +1.4.13 diff --git a/cmd/geth/main.go b/cmd/geth/main.go index e0e440e5b4..8bcf5c14ce 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -50,7 +50,7 @@ const ( clientIdentifier = "Geth" // Client identifier to advertise over the network versionMajor = 1 // Major version component of the current release versionMinor = 4 // Minor version component of the current release - versionPatch = 12 // Patch version component of the current release + versionPatch = 13 // Patch version component of the current release versionMeta = "stable" // Version metadata to append to the version string versionOracle = "0xfa7b9770ca4cb04296cac84f37736d4041251cdf" // Ethereum address of the Geth release oracle