Skip to content

Commit

Permalink
fix: nil condition
Browse files Browse the repository at this point in the history
  • Loading branch information
qinglin89 committed Jul 20, 2022
1 parent 7a9a8be commit 68f0488
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ func (s *StateDB) StopPrefetcher() {
if s.noTrie {
return
}
s.prefetcher.close()
s.prefetcherLock.Lock()
if s.prefetcher != nil {
s.prefetcher.close()
}
s.prefetcherLock.Unlock()
}

func (s *StateDB) TriePrefetchInAdvance(block *types.Block, signer types.Signer) {
Expand Down

0 comments on commit 68f0488

Please sign in to comment.