core/txpool: add documentation on GetCells and GetBlobCells

This commit is contained in:
healthykim 2026-06-15 22:48:34 +02:00
parent cff263473f
commit 5f16a5ea74
2 changed files with 6 additions and 4 deletions

View file

@ -1822,10 +1822,8 @@ func (p *BlobPool) GetBlobHashes(txHash common.Hash) []common.Hash {
return vhashes
}
// GetBlobCells returns cells for the given versioned blob hashes,
// filtered by the requested cell indices(mask).
// Each entry in the result corresponds to one vhash. Nil entries mean the blob
// was not available.
// GetBlobCells returns cells for the given versioned blob hashes. Nil entires
// mean that the cell was not available.
func (p *BlobPool) GetBlobCells(vhashes []common.Hash, mask types.CustodyBitmap) ([][]*kzg4844.Cell, [][]*kzg4844.Proof, error) {
var (
cells = make([][]*kzg4844.Cell, len(vhashes))

View file

@ -246,6 +246,10 @@ func (c *Cache) GetBlobs(ctx context.Context, vhashes []common.Hash, version byt
return blobs, commitments, proofs, nil
}
// GetCells returns cells for the given versioned blob hashes, filtered
// by the requested cell indices(mask). Each entry in the result
// corresponds to one vhash. Nil entries mean the cell was not available.
// If the cell is not available in cache, it falls back to the blobpool.
func (c *Cache) GetCells(vhashes []common.Hash, mask types.CustodyBitmap) ([][]*kzg4844.Cell, [][]*kzg4844.Proof, error) {
var (
cells = make([][]*kzg4844.Cell, len(vhashes))