core/txpool/blobpool: check the first byte on legacy tx check

This commit is contained in:
healthykim 2026-05-12 12:32:20 +02:00
parent 723e7304b8
commit f814ec33a3

View file

@ -719,10 +719,9 @@ func (p *BlobPool) Close() error {
func (p *BlobPool) parseTransaction(id uint64, size uint32, blob []byte) (bool, error) { func (p *BlobPool) parseTransaction(id uint64, size uint32, blob []byte) (bool, error) {
var ptx blobTxForPool var ptx blobTxForPool
if err := rlp.DecodeBytes(blob, &ptx); err != nil { if err := rlp.DecodeBytes(blob, &ptx); err != nil {
kind, _, _, splitErr := rlp.Split(blob) kind, content, _, splitErr := rlp.Split(blob)
if splitErr == nil && kind == rlp.String { // check whether it is legacy tx type
// legacy transaction is an RLP string if splitErr == nil && kind == rlp.String && len(content) > 1 && content[0] == 3 {
// while blobTxForPool is encoded as an RLP list.
return true, nil return true, nil
} }
return false, err return false, err