Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
sontrinh16 committed Dec 14, 2023
1 parent 051f085 commit 28aac5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extendeddatasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (eds *ExtendedDataSquare) UnmarshalJSON(b []byte) error {
func ComputeExtendedDataSquare(
data [][]byte,
codec Codec,
treeConstructor TreeConstructorFn,
treeCreatorFn TreeConstructorFn,
) (*ExtendedDataSquare, error) {
if len(data) > codec.MaxChunks() {
return nil, errors.New("number of chunks exceeds the maximum")
Expand All @@ -72,12 +72,12 @@ func ComputeExtendedDataSquare(
return nil, err
}

ds, err := newDataSquare(data, treeConstructor, uint(chunkSize))
ds, err := newDataSquare(data, treeCreatorFn, uint(chunkSize))
if err != nil {
return nil, err
}

treeName := GetTreeNameFromConstructorFn(treeConstructor)
treeName := GetTreeNameFromConstructorFn(treeCreatorFn)
if treeName == "" {
return nil, errors.New("tree name not found")
}
Expand All @@ -95,7 +95,7 @@ func ComputeExtendedDataSquare(
func ImportExtendedDataSquare(
data [][]byte,
codec Codec,
treeConstructor TreeConstructorFn,
treeCreatorFn TreeConstructorFn,
) (*ExtendedDataSquare, error) {
if len(data) > 4*codec.MaxChunks() {
return nil, errors.New("number of chunks exceeds the maximum")
Expand All @@ -107,7 +107,7 @@ func ImportExtendedDataSquare(
return nil, err
}

ds, err := newDataSquare(data, treeConstructor, uint(chunkSize))
ds, err := newDataSquare(data, treeCreatorFn, uint(chunkSize))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 28aac5b

Please sign in to comment.