mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
crypto/kzg4844: remove redundant check in gokzgRecoverBlobs
This commit is contained in:
parent
63f35121a1
commit
22bcf90bf0
1 changed files with 0 additions and 5 deletions
|
|
@ -18,7 +18,6 @@ package kzg4844
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
gokzg4844 "github.com/crate-crypto/go-eth-kzg"
|
gokzg4844 "github.com/crate-crypto/go-eth-kzg"
|
||||||
|
|
@ -204,10 +203,6 @@ func gokzgComputeCells(blobs []Blob) ([]Cell, error) {
|
||||||
func gokzgRecoverBlobs(cells []Cell, cellIndices []uint64) ([]Blob, error) {
|
func gokzgRecoverBlobs(cells []Cell, cellIndices []uint64) ([]Blob, error) {
|
||||||
gokzgIniter.Do(gokzgInit)
|
gokzgIniter.Do(gokzgInit)
|
||||||
|
|
||||||
if len(cellIndices) == 0 || len(cells)%len(cellIndices) != 0 {
|
|
||||||
return []Blob{}, errors.New("cells with wrong length")
|
|
||||||
}
|
|
||||||
|
|
||||||
blobCount := len(cells) / len(cellIndices)
|
blobCount := len(cells) / len(cellIndices)
|
||||||
blobs := make([]Blob, 0, blobCount)
|
blobs := make([]Blob, 0, blobCount)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue