Skip to content

Commit

Permalink
feat: node client discovery
Browse files Browse the repository at this point in the history
refs akash-network/support#165

Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Dec 16, 2023
1 parent f26d00c commit 27f3f0f
Show file tree
Hide file tree
Showing 23 changed files with 187 additions and 1,862 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project_name: node
dist: ./.cache/goreleaser
env:
- GO111MODULE=on
- CGO_ENABLED=1
Expand Down
1 change: 0 additions & 1 deletion client/broadcaster/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func BroadcastTX(ctx context.Context, cctx sdkclient.Context, flags *pflag.FlagS
}

return cctx.PrintProto(res)

}

// PrepareFactory has been copied from cosmos-sdk to make it public.
Expand Down
8 changes: 2 additions & 6 deletions client/broadcaster/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"

aclient "github.com/akash-network/akash-api/go/node/client/v1beta2"
sdkclient "github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
Expand All @@ -16,18 +17,13 @@ var (
ErrBroadcastTx = errors.New("broadcast tx error")
)

//go:generate mockery --name Client --output ./mocks
type Client interface {
Broadcast(ctx context.Context, msgs ...sdk.Msg) error
}

type simpleClient struct {
cctx sdkclient.Context
txf tx.Factory
info keyring.Info
}

func NewClient(cctx sdkclient.Context, txf tx.Factory, info keyring.Info) Client {
func NewClient(cctx sdkclient.Context, txf tx.Factory, info keyring.Info) aclient.Tx {
return &simpleClient{
cctx: cctx,
txf: txf,
Expand Down
95 changes: 0 additions & 95 deletions client/broadcaster/mocks/client.go

This file was deleted.

Loading

0 comments on commit 27f3f0f

Please sign in to comment.