Skip to content

Commit

Permalink
chore!: unexport merge (celestiaorg#1016)
Browse files Browse the repository at this point in the history
Closes celestiaorg#840

Reduce the public API of the shares package by unexporting `Merge`. This
function doesn't appear invoked by celestia-node
([search](https://github.com/celestiaorg/celestia-node/search?q=Merge))
so it doesn't seem necessary to export.
  • Loading branch information
rootulp authored and rach-id committed Nov 17, 2022
1 parent 44abd13 commit 7cfc795
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/shares/share_merging.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
coretypes "github.com/tendermint/tendermint/types"
)

// Merge extracts block data from an extended data square.
func Merge(eds *rsmt2d.ExtendedDataSquare) (coretypes.Data, error) {
// merge extracts block data from an extended data square.
func merge(eds *rsmt2d.ExtendedDataSquare) (coretypes.Data, error) {
squareSize := eds.Width() / 2

// sort block data shares by namespace
Expand Down
2 changes: 1 addition & 1 deletion pkg/shares/shares_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func TestMerge(t *testing.T) {
t.Error(err)
}

res, err := Merge(eds)
res, err := merge(eds)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 7cfc795

Please sign in to comment.