Skip to content

Commit

Permalink
chore: pkg import only once
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <[email protected]>
  • Loading branch information
testwill committed Oct 16, 2023
1 parent 7fe0bae commit b426336
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions events/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/spf13/viper"
"golang.org/x/sync/errgroup"

"github.com/akash-network/node/cmd/common"
cmdcommon "github.com/akash-network/node/cmd/common"
"github.com/akash-network/node/events"
"github.com/akash-network/node/pubsub"
Expand All @@ -23,7 +22,7 @@ func EventCmd() *cobra.Command {
Use: "events",
Short: "Prints out akash events in real time",
RunE: func(cmd *cobra.Command, args []string) error {
return common.RunForeverWithContext(cmd.Context(), func(ctx context.Context) error {
return cmdcommon.RunForeverWithContext(cmd.Context(), func(ctx context.Context) error {
return getEvents(ctx, cmd, args)
})
},
Expand Down
3 changes: 1 addition & 2 deletions testutil/network_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
cosmosauthtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

Expand Down Expand Up @@ -132,7 +131,7 @@ func (nts *NetworkTestSuite) SetupSuite() {

for lctx.Err() == nil {
// check the TX
txStatus, err := authtx.QueryTx(nts.Context(), txr.TxHash)
txStatus, err := cosmosauthtx.QueryTx(nts.Context(), txr.TxHash)
if err != nil {
if strings.Contains(err.Error(), ") not found") {
continue
Expand Down
3 changes: 1 addition & 2 deletions x/audit/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
types "github.com/akash-network/akash-api/go/node/audit/v1beta3"
ptypes "github.com/akash-network/akash-api/go/node/provider/v1beta3"
akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3"
atypes "github.com/akash-network/akash-api/go/node/types/v1beta3"

"github.com/akash-network/node/client/broadcaster"
)
Expand Down Expand Up @@ -152,7 +151,7 @@ func readAttributes(cmd *cobra.Command, cctx client.Context, provider string, ar

if len(args) != 0 {
for i := 0; i < len(args); i += 2 {
attr = append(attr, atypes.Attribute{
attr = append(attr, akashtypes.Attribute{
Key: args[i],
Value: args[i+1],
})
Expand Down
5 changes: 2 additions & 3 deletions x/audit/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
types "github.com/akash-network/akash-api/go/node/audit/v1beta3"

akashtypes "github.com/akash-network/akash-api/go/node/types/v1beta3"
atypes "github.com/akash-network/akash-api/go/node/types/v1beta3"
)

// TODO: use interfaces for keepers, queriers
Expand Down Expand Up @@ -114,7 +113,7 @@ func (k Keeper) CreateOrUpdateProviderAttributes(ctx sdk.Context, id types.Provi
attr = akashtypes.Attributes{}

for ky, val := range kv {
attr = append(attr, atypes.Attribute{
attr = append(attr, akashtypes.Attribute{
Key: ky,
Value: val,
})
Expand Down Expand Up @@ -176,7 +175,7 @@ func (k Keeper) DeleteProviderAttributes(ctx sdk.Context, id types.ProviderID, k
var attr akashtypes.Attributes

for ky, val := range kv {
attr = append(attr, atypes.Attribute{
attr = append(attr, akashtypes.Attribute{
Key: ky,
Value: val,
})
Expand Down

0 comments on commit b426336

Please sign in to comment.