mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
core/txpool/blobpool: move conversion into method
This commit is contained in:
parent
bca071a1dd
commit
c426d92ccf
1 changed files with 54 additions and 50 deletions
|
|
@ -903,7 +903,12 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
|
|||
}
|
||||
// Initiate the background conversion thread, the mutex is not required
|
||||
// and won't block any pool operation.
|
||||
go func() {
|
||||
go p.convertLegacySidecars(txs)
|
||||
}
|
||||
}
|
||||
|
||||
// convertLegacySidecars converts all given transactions to sidecar version 1.
|
||||
func (p *BlobPool) convertLegacySidecars(txs map[common.Address]map[uint64]uint64) {
|
||||
var (
|
||||
start = time.Now()
|
||||
success int
|
||||
|
|
@ -948,12 +953,11 @@ func (p *BlobPool) Reset(oldHead, newHead *types.Header) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if p.sidecarMigrationDoneCh != nil {
|
||||
close(p.sidecarMigrationDoneCh)
|
||||
}
|
||||
log.Info("Completed the blob transaction conversion", "discarded", fail, "injected", success, "elapsed", common.PrettyDuration(time.Since(start)))
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
// reorg assembles all the transactors and missing transactions between an old
|
||||
|
|
|
|||
Loading…
Reference in a new issue