mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core/state: prefetch account trie while start a prefetcher
This commit is contained in:
parent
a6751d6fc8
commit
6b23128f61
1 changed files with 3 additions and 0 deletions
|
|
@ -208,6 +208,9 @@ func (s *StateDB) StartPrefetcher(namespace string) {
|
|||
}
|
||||
if s.snap != nil {
|
||||
s.prefetcher = newTriePrefetcher(s.db, s.originalRoot, namespace)
|
||||
if err := s.prefetcher.prefetch(common.Hash{}, s.originalRoot, common.Address{}, [][]byte{}); err != nil {
|
||||
log.Error("Failed to prefetch account trie", "pre-state root", s.originalRoot.String(), "err", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue