diff --git a/triedb/pathdb/reader.go b/triedb/pathdb/reader.go index 30f75d1058..f1ab445238 100644 --- a/triedb/pathdb/reader.go +++ b/triedb/pathdb/reader.go @@ -114,7 +114,7 @@ func (r *reader) Account(hash common.Hash) (*types.SlimAccount, error) { } account := new(types.SlimAccount) if err := rlp.DecodeBytes(blob, account); err != nil { - panic(err) + return nil, fmt.Errorf("failed to decode account: %w", err) } return account, nil }