address feedback

This commit is contained in:
Jared Wasinger 2024-02-27 14:23:31 -08:00
parent dc16ec33ee
commit 8d1074fc37

View file

@ -103,7 +103,7 @@ func (p *triePrefetcher) close() {
p.closed = true
}
// prefetch schedules a batch of trie items to prefetch.
// prefetch schedules a batch of trie items to prefetch. After the prefetcher is closed, all the following tasks scheduled will not be executed.
//
// prefetch is called from two locations:
// 1. Finalize of the state-objects storage roots. This happens at the end
@ -126,7 +126,7 @@ func (p *triePrefetcher) prefetch(owner common.Hash, root common.Hash, addr comm
func (p *triePrefetcher) trie(owner common.Hash, root common.Hash) Trie {
// Bail if no trie was prefetched for this root
fetcher := p.fetchers[p.trieID(owner, root)]
if fetcher == nil {
if fetcher == nil || fetcher.trie == nil {
p.deliveryMissMeter.Mark(1)
return nil
}