mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/txpool/blobpool: remove unused convertSidecars function
This commit is contained in:
parent
d89b92ce1d
commit
ffd618c614
1 changed files with 0 additions and 27 deletions
|
|
@ -1397,33 +1397,6 @@ func (p *BlobPool) AvailableBlobs(vhashes []common.Hash) int {
|
||||||
return available
|
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
|
// Add inserts a set of blob transactions into the pool if they pass validation (both
|
||||||
// consensus validity and pool restrictions).
|
// consensus validity and pool restrictions).
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue