diff --git a/core/types/receipt.go b/core/types/receipt.go index 107946b988..a8270fd0cc 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -165,6 +165,8 @@ func (r *Receipt) DecodeRLP(s *rlp.Stream) error { } r.Type = LegacyTxType return r.setFromRLP(dec) + case kind == rlp.Byte: + return errShortTypedReceipt default: // It's an EIP-2718 typed tx receipt. b, buf, err := getPooledBuffer(size) diff --git a/core/types/transaction.go b/core/types/transaction.go index d2e5d278bc..78a1b9ba64 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -145,6 +145,8 @@ func (tx *Transaction) DecodeRLP(s *rlp.Stream) error { tx.setDecoded(&inner, rlp.ListSize(size)) } return err + case kind == rlp.Byte: + return errShortTypedTx default: // It's an EIP-2718 typed TX envelope. // First read the tx payload bytes into a temporary buffer.