core/txpool: use blobTxForPool inside of Reset function (#34960)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled

This PR fixes a bug in the current blobpool `Reset` function where it
used the Transaction type instead of blobTxForPool.

Decoding transactions fetched from the pool as Transaction type 
caused an error because the blobpool stores blobTxForPool types.
This commit is contained in:
cui 2026-05-15 21:51:46 +08:00 committed by GitHub
parent 6f6d006f74
commit 8a0223e8da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1107,13 +1107,13 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
log.Error("Blobs missing for announcable transaction", "from", addr, "nonce", meta.nonce, "id", meta.id, "err", err)
continue
}
var tx types.Transaction
if err = rlp.DecodeBytes(data, &tx); err != nil {
var ptx blobTxForPool
if err = rlp.DecodeBytes(data, &ptx); err != nil {
log.Error("Blobs corrupted for announcable transaction", "from", addr, "nonce", meta.nonce, "id", meta.id, "err", err)
continue
}
announcable = append(announcable, tx.WithoutBlobTxSidecar())
log.Trace("Blob transaction now announcable", "from", addr, "nonce", meta.nonce, "id", meta.id, "hash", tx.Hash())
announcable = append(announcable, ptx.Tx)
log.Trace("Blob transaction now announcable", "from", addr, "nonce", meta.nonce, "id", meta.id, "hash", ptx.Tx.Hash())
}
}
}