Update accessors_indexes.go

This commit is contained in:
Felix Lange 2025-06-16 14:58:27 +02:00 committed by GitHub
parent 3bd0deacbc
commit a42332e750
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,11 +161,11 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com
// which are encoded as byte arrays, the preimage is the content of // which are encoded as byte arrays, the preimage is the content of
// the byte array, so trim their prefix here. // the byte array, so trim their prefix here.
txRLP := txnIterator.Value() txRLP := txnIterator.Value()
rlpKind, txHashPayload, _, err := rlp.Split(txRLP) kind, txHashPayload, _, err := rlp.Split(txRLP)
if err != nil { if err != nil {
return nil, common.Hash{}, 0, 0 return nil, common.Hash{}, 0, 0
} }
if rlpKind == rlp.List { if kind == rlp.List {
txHashPayload = txRLP txHashPayload = txRLP
} }
if crypto.Keccak256Hash(txHashPayload) == hash { if crypto.Keccak256Hash(txHashPayload) == hash {