aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/statedb.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r--core/state/statedb.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 1c75ee4db..134c4b3c7 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -296,10 +296,6 @@ func (s *StateDB) Reset() {
// Reset all nested states
for _, stateObject := range s.stateObjects {
- if stateObject.State == nil {
- continue
- }
-
stateObject.Reset()
}
@@ -310,11 +306,7 @@ func (s *StateDB) Reset() {
func (s *StateDB) Sync() {
// Sync all nested states
for _, stateObject := range s.stateObjects {
- if stateObject.State == nil {
- continue
- }
-
- stateObject.State.Sync()
+ stateObject.trie.Commit()
}
s.trie.Commit()
@@ -339,7 +331,7 @@ func (self *StateDB) Update() {
if stateObject.remove {
self.DeleteStateObject(stateObject)
} else {
- stateObject.Sync()
+ stateObject.Update()
self.UpdateStateObject(stateObject)
}