Skip to content

Commit

Permalink
copies return unwrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Oct 1, 2024
1 parent f3612cd commit ed77f19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/state/prefetcher_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package state

import (
"fmt"
"sync"

"github.com/ava-labs/coreth/core/types"
Expand Down Expand Up @@ -49,9 +48,9 @@ func (p *prefetcherDatabase) OpenStorageTrie(stateRoot common.Hash, address comm
func (p *prefetcherDatabase) CopyTrie(t Trie) Trie {
switch t := t.(type) {
case *prefetcherTrie:
return newPrefetcherTrie(p, t.getCopy())
return t.getCopy()
default:
panic(fmt.Errorf("unknown trie type %T", t))
return p.Database.CopyTrie(t)
}
}

Expand Down

0 comments on commit ed77f19

Please sign in to comment.