fix: fix partial lint error

This commit is contained in:
healthykim 2025-10-24 17:15:24 +09:00
parent df81462230
commit 296e83d5c5

View file

@ -210,15 +210,15 @@ func (c *BlobTxCellSidecar) ValidateBlobCommitmentHashes(hashes []common.Hash) e
// ToV1 converts the BlobSidecar to version 1, attaching the cell proofs. // ToV1 converts the BlobSidecar to version 1, attaching the cell proofs.
// This function only available when we can recover the original blob with given cells // This function only available when we can recover the original blob with given cells
// TODO: duplication // TODO: duplication
func (sc *BlobTxCellSidecar) ToV1() error { func (c *BlobTxCellSidecar) ToV1() error {
if sc.Version == BlobSidecarVersion1 { if c.Version == BlobSidecarVersion1 {
return nil return nil
} }
blobs, err := kzg4844.RecoverBlobs(sc.Cells, sc.Custody.Indices()) blobs, err := kzg4844.RecoverBlobs(c.Cells, c.Custody.Indices())
if err != nil { if err != nil {
return err return err
} }
if sc.Version == BlobSidecarVersion0 { if c.Version == BlobSidecarVersion0 {
proofs := make([]kzg4844.Proof, 0, len(blobs)*kzg4844.CellProofsPerBlob) proofs := make([]kzg4844.Proof, 0, len(blobs)*kzg4844.CellProofsPerBlob)
for _, blob := range blobs { for _, blob := range blobs {
cellProofs, err := kzg4844.ComputeCellProofs(&blob) cellProofs, err := kzg4844.ComputeCellProofs(&blob)
@ -227,8 +227,8 @@ func (sc *BlobTxCellSidecar) ToV1() error {
} }
proofs = append(proofs, cellProofs...) proofs = append(proofs, cellProofs...)
} }
sc.Version = BlobSidecarVersion1 c.Version = BlobSidecarVersion1
sc.Proofs = proofs c.Proofs = proofs
} }
return nil return nil
} }