Skip to content

Commit 421df86

Browse files
authored
Merge pull request ethereum#3007 from karalabe/release/1.4
Geth 1.4.12: Shanghai with love
2 parents fed692f + dfc63c4 commit 421df86

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.11
1+
1.4.12

cmd/geth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const (
5050
clientIdentifier = "Geth" // Client identifier to advertise over the network
5151
versionMajor = 1 // Major version component of the current release
5252
versionMinor = 4 // Minor version component of the current release
53-
versionPatch = 11 // Patch version component of the current release
53+
versionPatch = 12 // Patch version component of the current release
5454
versionMeta = "stable" // Version metadata to append to the version string
5555

5656
versionOracle = "0xfa7b9770ca4cb04296cac84f37736d4041251cdf" // Ethereum address of the Geth release oracle

core/state/state_object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (self *StateObject) Copy() *StateObject {
187187
stateObject.codeHash = common.CopyBytes(self.codeHash)
188188
stateObject.nonce = self.nonce
189189
stateObject.trie = self.trie
190-
stateObject.code = common.CopyBytes(self.code)
190+
stateObject.code = self.code
191191
stateObject.initCode = common.CopyBytes(self.initCode)
192192
stateObject.storage = self.storage.Copy()
193193
stateObject.remove = self.remove

core/state/state_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ func TestSnapshot2(t *testing.T) {
149149
so0.balance = big.NewInt(42)
150150
so0.nonce = 43
151151
so0.SetCode([]byte{'c', 'a', 'f', 'e'})
152-
so0.remove = true
152+
so0.remove = false
153153
so0.deleted = false
154-
so0.dirty = false
154+
so0.dirty = true
155155
state.SetStateObject(so0)
156+
state.Commit()
156157

157158
// and one with deleted == true
158159
so1 := state.GetStateObject(stateobjaddr1)
@@ -173,6 +174,7 @@ func TestSnapshot2(t *testing.T) {
173174
state.Set(snapshot)
174175

175176
so0Restored := state.GetStateObject(stateobjaddr0)
177+
so0Restored.GetState(storageaddr)
176178
so1Restored := state.GetStateObject(stateobjaddr1)
177179
// non-deleted is equal (restored)
178180
compareStateObjects(so0Restored, so0, t)

core/state/statedb.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ func (self *StateDB) Copy() *StateDB {
324324
state, _ := New(common.Hash{}, self.db)
325325
state.trie = self.trie
326326
for k, stateObject := range self.stateObjects {
327-
state.stateObjects[k] = stateObject.Copy()
327+
if stateObject.dirty {
328+
state.stateObjects[k] = stateObject.Copy()
329+
}
328330
}
329331

330332
state.refund.Set(self.refund)
@@ -364,7 +366,6 @@ func (s *StateDB) IntermediateRoot() common.Hash {
364366
stateObject.Update()
365367
s.UpdateStateObject(stateObject)
366368
}
367-
stateObject.dirty = false
368369
}
369370
}
370371
return s.trie.Hash()

0 commit comments

Comments
 (0)