Skip to content

Commit

Permalink
chore: bump versions of app/sdk/core dependencies to latest (celestia…
Browse files Browse the repository at this point in the history
…org#736)

Co-authored-by: Wondertan <[email protected]>
  • Loading branch information
Bidon15 and Wondertan authored May 24, 2022
1 parent eed1a14 commit 2d50db4
Show file tree
Hide file tree
Showing 25 changed files with 451 additions and 757 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ install-shed:
fmt:
@find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs gofmt -w -s
@find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs goimports -w -local github.com/celestiaorg
@go mod tidy
@go mod tidy -compat=1.17
.PHONY: fmt

## lint: Linting *.go files using golangci-lint. Look for .golangci.yml for the list of linters.
Expand Down
7 changes: 5 additions & 2 deletions cmd/celestia/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/tendermint/spm/cosmoscmd"

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-node/cmd"

sdk "github.com/cosmos/cosmos-sdk/types"
)

func init() {
// This is necessary to ensure that the account addresses are correctly prefixed
// as in the celestia application.
cosmoscmd.SetPrefixes(app.AccountAddressPrefix)
cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub)
cfg.Seal()

rootCmd.AddCommand(
bridgeCmd,
Expand Down
1 change: 0 additions & 1 deletion core/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func NewRemote(protocol, remoteAddr string) (Client, error) {

return http.NewWithClient(
fmt.Sprintf("%s://%s", protocol, remoteAddr),
"/websocket",
httpClient.StandardClient(),
)
}
8 changes: 4 additions & 4 deletions core/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import (
)

func TestRemoteClient_Status(t *testing.T) {
_, client := StartTestClient(t)

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

_, client := StartTestClient(ctx, t)

status, err := client.Status(ctx)
require.NoError(t, err)
require.NotNil(t, status)
}

func TestRemoteClient_StartBlockSubscription_And_GetBlock(t *testing.T) {
_, client := StartTestClient(t)

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

_, client := StartTestClient(ctx, t)

eventChan, err := client.Subscribe(ctx, newBlockSubscriber, newBlockEventQuery)
require.NoError(t, err)

Expand Down
57 changes: 0 additions & 57 deletions core/config.go

This file was deleted.

2 changes: 1 addition & 1 deletion core/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const newBlockSubscriber = "NewBlock/Events"

var (
log = logging.Logger("core/fetcher")
newBlockEventQuery = types.QueryForEvent(types.EventNewBlock).String()
newBlockEventQuery = types.QueryForEvent(types.EventNewBlockValue).String()
)

type BlockFetcher struct {
Expand Down
12 changes: 6 additions & 6 deletions core/fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
)

func TestBlockFetcher_GetBlock_and_SubscribeNewBlockEvent(t *testing.T) {
_, client := StartTestClient(t)
fetcher := NewBlockFetcher(client)

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

_, client := StartTestClient(ctx, t)
fetcher := NewBlockFetcher(client)

// generate some blocks
newBlockChan, err := fetcher.SubscribeNewBlockEvent(ctx)
require.NoError(t, err)
Expand All @@ -36,12 +36,12 @@ func TestBlockFetcher_GetBlock_and_SubscribeNewBlockEvent(t *testing.T) {
// TestBlockFetcherHeaderValues tests that both the Commit and ValidatorSet
// endpoints are working as intended.
func TestBlockFetcherHeaderValues(t *testing.T) {
_, client := StartTestClient(t)
fetcher := NewBlockFetcher(client)

ctx, cancel := context.WithCancel(context.Background())
t.Cleanup(cancel)

_, client := StartTestClient(ctx, t)
fetcher := NewBlockFetcher(client)

// generate some blocks
newBlockChan, err := fetcher.SubscribeNewBlockEvent(ctx)
require.NoError(t, err)
Expand Down
118 changes: 0 additions & 118 deletions core/init.go

This file was deleted.

19 changes: 0 additions & 19 deletions core/init_test.go

This file was deleted.

Loading

0 comments on commit 2d50db4

Please sign in to comment.