mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
fix: fix partial lint error
This commit is contained in:
parent
df81462230
commit
296e83d5c5
1 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue