core/txpool/blobpool: rename buffer.add into storeCompleted

This commit is contained in:
Felix Lange 2026-06-12 19:54:51 +02:00
parent 589f80ca56
commit 4d107e77dc

View file

@ -137,7 +137,7 @@ func (b *BlobBuffer) AddTx(txs []*types.Transaction, peer string) []error {
continue continue
} }
if entry, ok := b.cells[hash]; ok { if entry, ok := b.cells[hash]; ok {
b.add(hash, tx, entry) b.storeCompleted(hash, tx, entry)
continue continue
} }
blobBufferTxFirstCounter.Inc(1) blobBufferTxFirstCounter.Inc(1)
@ -162,13 +162,14 @@ func (b *BlobBuffer) AddCells(hash common.Hash, deliveries map[string]*PeerDeliv
added: time.Now(), added: time.Now(),
} }
if txe, ok := b.txs[hash]; ok { if txe, ok := b.txs[hash]; ok {
b.add(hash, txe.tx, b.cells[hash]) b.storeCompleted(hash, txe.tx, b.cells[hash])
} }
blobBufferCellsFirstCounter.Inc(1) blobBufferCellsFirstCounter.Inc(1)
} }
// add verifies cells per-peer, sorts them, and adds to the pool. // storeCompleted verifies cells per-peer, sorts them, and schedules them for
func (b *BlobBuffer) add(hash common.Hash, tx *types.Transaction, cells *cellEntry) { // addition into the pool. The actual addition happens in Flush().
func (b *BlobBuffer) storeCompleted(hash common.Hash, tx *types.Transaction, cells *cellEntry) {
sidecar := tx.BlobTxSidecar() sidecar := tx.BlobTxSidecar()
// Per-peer cell verification // Per-peer cell verification