Skip to content

Commit

Permalink
remove unneccesary change
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Jun 16, 2023
1 parent ba95a85 commit 4600d54
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/docgen/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var ExampleValues = map[reflect.Type]interface{}{
}

func init() {
addToExampleValues(share.EmptyBlockEDS())
addToExampleValues(share.EmptyExtendedDataSquare())
addr, err := sdk.AccAddressFromBech32("celestia1377k5an3f94v6wyaceu0cf4nq6gk2jtpc46g7h")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion core/eds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ func TestNonEmptySquareWithZeroTxs(t *testing.T) {
eds, err := extendBlock(data)
require.NoError(t, err)
dah := da.NewDataAvailabilityHeader(eds)
assert.Equal(t, share.EmptyBlockRoot().Hash(), dah.Hash())
assert.Equal(t, share.EmptyRoot().Hash(), dah.Hash())
}
2 changes: 1 addition & 1 deletion nodebuilder/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TestEmptyBlockExists(t *testing.T) {
require.NoError(t, err)

// ensure an empty block exists in store
err = node.ShareServ.SharesAvailable(ctx, share.EmptyBlockRoot())
err = node.ShareServ.SharesAvailable(ctx, share.EmptyRoot())
require.NoError(t, err)

err = node.Stop(ctx)
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/share/constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newModule(getter share.Getter, avail share.Availability) Module {

// ensureEmptyCARExists adds an empty EDS to the provided EDS store.
func ensureEmptyCARExists(ctx context.Context, store *eds.Store) error {
emptyEDS := share.EmptyBlockEDS()
emptyEDS := share.EmptyExtendedDataSquare()
emptyDAH := da.NewDataAvailabilityHeader(emptyEDS)

err := store.Put(ctx, emptyDAH.Hash(), emptyEDS)
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/share/share_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Test_EmptyCARExists(t *testing.T) {
err = edsStore.Start(ctx)
require.NoError(t, err)

eds := share.EmptyBlockEDS()
eds := share.EmptyExtendedDataSquare()
dah := da.NewDataAvailabilityHeader(eds)

// add empty EDS to store
Expand Down
8 changes: 4 additions & 4 deletions share/empty.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"github.com/celestiaorg/rsmt2d"
)

// EmptyBlockRoot returns Root of the empty block EDS.
func EmptyBlockRoot() *Root {
// EmptyRoot returns Root of the empty block EDS.
func EmptyRoot() *Root {
return emptyBlockRoot
}

// EmptyBlockEDS returns the EDS of the empty block data square.
func EmptyBlockEDS() *rsmt2d.ExtendedDataSquare {
// EmptyExtendedDataSquare returns the EDS of the empty block data square.
func EmptyExtendedDataSquare() *rsmt2d.ExtendedDataSquare {
return emptyBlockEDS
}

Expand Down
2 changes: 1 addition & 1 deletion share/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ func (dh DataHash) String() string {

// IsEmptyRoot check whether DataHash corresponds to the root of an empty block EDS.
func (dh DataHash) IsEmptyRoot() bool {
return bytes.Equal(EmptyBlockRoot().Hash(), dh)
return bytes.Equal(EmptyRoot().Hash(), dh)
}

0 comments on commit 4600d54

Please sign in to comment.