|
|
@ -860,6 +860,9 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { |
|
|
|
} |
|
|
|
} |
|
|
|
obj := s.stateObjects[addr] // closure for the task runner below
|
|
|
|
obj := s.stateObjects[addr] // closure for the task runner below
|
|
|
|
workers.Go(func() error { |
|
|
|
workers.Go(func() error { |
|
|
|
|
|
|
|
if s.db.TrieDB().IsVerkle() { |
|
|
|
|
|
|
|
obj.updateTrie() |
|
|
|
|
|
|
|
} else { |
|
|
|
obj.updateRoot() |
|
|
|
obj.updateRoot() |
|
|
|
|
|
|
|
|
|
|
|
// If witness building is enabled and the state object has a trie,
|
|
|
|
// If witness building is enabled and the state object has a trie,
|
|
|
@ -867,6 +870,7 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { |
|
|
|
if s.witness != nil && obj.trie != nil { |
|
|
|
if s.witness != nil && obj.trie != nil { |
|
|
|
s.witness.AddState(obj.trie.Witness()) |
|
|
|
s.witness.AddState(obj.trie.Witness()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|