From 0d78087e885e11787d79eaecc13d68d9d93114c5 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 29 May 2024 05:26:17 -0700 Subject: [PATCH] move set back to account-trie-update block scoping for easier readability --- core/state/statedb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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