mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
apply suggestion
> Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This commit is contained in:
parent
b01d3a5ddb
commit
d9e3bceb92
1 changed files with 5 additions and 2 deletions
|
|
@ -314,9 +314,12 @@ func (s *stateObject) updateTrie() (Trie, error) {
|
|||
}
|
||||
// Retrieve a pretecher populated trie, or fall back to the database
|
||||
tr := s.getPrefetchedTrie()
|
||||
if tr == nil {
|
||||
var err error
|
||||
if tr != nil {
|
||||
// Prefetcher returned a live trie, swap it out for the current one
|
||||
s.trie = tr
|
||||
} else {
|
||||
// Fetcher not running or empty trie, fallback to the database trie
|
||||
var err error
|
||||
tr, err = s.getTrie()
|
||||
if err != nil {
|
||||
s.db.setError(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue