core/txpool/blobpool: remove unused convertSidecars function

This commit is contained in:
lightclient 2025-09-09 09:50:47 -06:00
parent d89b92ce1d
commit ffd618c614
No known key found for this signature in database
GPG key ID: 657913021EF45A6A

View file

@ -1397,33 +1397,6 @@ func (p *BlobPool) AvailableBlobs(vhashes []common.Hash) int {
return available
}
// convertSidecar converts the legacy sidecar in the submitted transactions
// if Osaka fork has been activated.
func (p *BlobPool) convertSidecar(txs []*types.Transaction) ([]*types.Transaction, []error) {
head := p.chain.CurrentBlock()
if !p.chain.Config().IsOsaka(head.Number, head.Time) {
return txs, make([]error, len(txs))
}
var errs []error
for _, tx := range txs {
// Validate the transaction at first to avoid unnecessary conversion.
if err := p.validateTx(tx); err != nil {
errs = append(errs, err)
continue
}
sidecar := tx.BlobTxSidecar()
if sidecar.Version == types.BlobSidecarVersion0 {
if err := sidecar.ToV1(); err != nil {
errs = append(errs, err)
continue
}
}
errs = append(errs, nil)
}
return txs, errs
}
// Add inserts a set of blob transactions into the pool if they pass validation (both
// consensus validity and pool restrictions).
//