Skip to content

Commit 0d78087

Browse files
committed
move set back to account-trie-update block scoping for easier readability
1 parent 659a98c commit 0d78087

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/state/statedb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,6 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) {
11591159
start = time.Now()
11601160
root common.Hash
11611161
workers errgroup.Group
1162-
set *trienode.NodeSet
11631162
)
11641163
// Schedule the account trie first since that will be the biggest, so give
11651164
// it the most time to crunch.
@@ -1172,7 +1171,8 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) {
11721171
// code didn't anticipate for.
11731172
workers.Go(func() error {
11741173
// Write the account trie changes, measuring the amount of wasted time
1175-
root, set = s.trie.Commit(true)
1174+
newroot, set := s.trie.Commit(true)
1175+
root = newroot
11761176

11771177
if err := merge(set); err != nil {
11781178
return err

0 commit comments

Comments
 (0)