Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: pkg import only once #1897

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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