diff --git a/core/state/statedb.go b/core/state/statedb.go index 4c58646835..d131424817 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1159,7 +1159,6 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) { start = time.Now() root common.Hash workers errgroup.Group - set *trienode.NodeSet ) // Schedule the account trie first since that will be the biggest, so give // it the most time to crunch. @@ -1172,7 +1171,8 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) { // code didn't anticipate for. workers.Go(func() error { // Write the account trie changes, measuring the amount of wasted time - root, set = s.trie.Commit(true) + newroot, set := s.trie.Commit(true) + root = newroot if err := merge(set); err != nil { return err