diff --git a/core/state/state_object.go b/core/state/state_object.go index 400ce5e2b2..933e816534 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -454,9 +454,9 @@ func (s *stateObject) commit() error { if s.dbErr != nil { return s.dbErr } - root, err := s.trie.Commit(nil) + _, err := s.trie.Commit(nil) if err == nil { - s.data.Root = root + //s.data.Root = root // Update original account data after commit s.origin = s.data.Copy() } diff --git a/core/state/statedb.go b/core/state/statedb.go index 4283cc6113..abc635ac21 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1048,7 +1048,7 @@ func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool) (common.Hash, er return common.Hash{}, fmt.Errorf("commit aborted due to earlier error: %v", s.dbErr) } // Finalize any pending changes and merge everything into the tries - s.IntermediateRoot(deleteEmptyObjects) + root := s.IntermediateRoot(deleteEmptyObjects) start := time.Now() // Commit objects to the trie, measuring the elapsed time @@ -1101,7 +1101,7 @@ func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool) (common.Hash, er // The onleaf func is called _serially_, so we can reuse the same account // for unmarshalling every time. var account types.StateAccount - root, err := s.trie.Commit(func(_ [][]byte, _ []byte, leaf []byte, parent common.Hash) error { + _, err := s.trie.Commit(func(_ [][]byte, _ []byte, leaf []byte, parent common.Hash) error { if err := rlp.DecodeBytes(leaf, &account); err != nil { return nil }