diff --git a/core/state/pruner/pruner.go b/core/state/pruner/pruner.go index 0845c0ec50..1e959bd13d 100644 --- a/core/state/pruner/pruner.go +++ b/core/state/pruner/pruner.go @@ -381,14 +381,7 @@ func dumpRawTrieDescendants(db ethdb.Database, root common.Hash, output *stateBl output.Put(data.CodeHash, nil) } if data.Root != (common.Hash{}) { - // Lookup the preimage of account hash - preimage := tr.GetKey(accountIt.LeafKey()) - if preimage == nil { - return errors.New("account address is not available") - } - address := common.BytesToAddress(preimage) - - storageTr, err := sdb.OpenStorageTrie(key, address, data.Root) + storageTr, err := trie.NewStateTrie(trie.StorageTrieID(root, key, data.Root), sdb.TrieDB()) if err != nil { return err }