Skip to content

Commit

Permalink
chore: remove unnecessary conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
estensen committed Dec 20, 2023
1 parent 8908c6c commit 943a618
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion datasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func newDataSquare(data [][]byte, treeCreator TreeConstructorFn, chunkSize uint)
squareRow: squareRow,
squareCol: squareCol,
width: uint(width),
chunkSize: uint(chunkSize),
chunkSize: chunkSize,
createTreeFn: treeCreator,
}, nil
}
Expand Down
4 changes: 2 additions & 2 deletions extendeddatasquare.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func ComputeExtendedDataSquare(
}

chunkSize := getChunkSize(data)
err := codec.ValidateChunkSize(int(chunkSize))
err := codec.ValidateChunkSize(chunkSize)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -86,7 +86,7 @@ func ImportExtendedDataSquare(
}

chunkSize := getChunkSize(data)
err := codec.ValidateChunkSize(int(chunkSize))
err := codec.ValidateChunkSize(chunkSize)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion extendeddatasquare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestNewExtendedDataSquare(t *testing.T) {
got, err := NewExtendedDataSquare(NewLeoRSCodec(), NewDefaultTree, edsWidth, shareSize)
assert.NoError(t, err)

chunk := bytes.Repeat([]byte{1}, int(incorrectChunkSize))
chunk := bytes.Repeat([]byte{1}, incorrectChunkSize)
err = got.SetCell(0, 0, chunk)
assert.Error(t, err)
})
Expand Down

0 comments on commit 943a618

Please sign in to comment.