Skip to content

Commit

Permalink
chore: remove consensus as a direct dependency (cosmos#20274)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored May 6, 2024
1 parent a52f831 commit fc310b6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package types_test
package keeper

import (
"testing"

"github.com/stretchr/testify/require"

"cosmossdk.io/x/auth/testutil"
"cosmossdk.io/x/auth/types"

"github.com/cosmos/cosmos-sdk/testutil/network"
)

func TestAccountRetriever(t *testing.T) {
cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig)
cfg, err := network.DefaultConfigWithAppConfig(AppConfig)
require.NoError(t, err)
cfg.NumValidators = 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutil
package keeper

import (
_ "cosmossdk.io/x/accounts" // import as blank for app wiring
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package keeper_test
package keeper

import (
"testing"
Expand All @@ -8,7 +8,6 @@ import (
"cosmossdk.io/depinject"
"cosmossdk.io/log"
"cosmossdk.io/x/auth/keeper"
"cosmossdk.io/x/auth/testutil"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -20,7 +19,7 @@ func BenchmarkAccountMapperGetAccountFound(b *testing.B) {
app, err := simtestutil.Setup(
depinject.Configs(
depinject.Supply(log.NewNopLogger()),
testutil.AppConfig,
AppConfig,
),
&accountKeeper,
)
Expand Down Expand Up @@ -49,7 +48,7 @@ func BenchmarkAccountMapperSetAccount(b *testing.B) {
app, err := simtestutil.Setup(
depinject.Configs(
depinject.Supply(log.NewNopLogger()),
testutil.AppConfig,
AppConfig,
), &accountKeeper)
require.NoError(b, err)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package auth_test
package keeper

import (
"testing"
Expand All @@ -8,7 +8,6 @@ import (
"cosmossdk.io/depinject"
"cosmossdk.io/log"
"cosmossdk.io/x/auth/keeper"
"cosmossdk.io/x/auth/testutil"
"cosmossdk.io/x/auth/types"

simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
Expand All @@ -18,7 +17,7 @@ func TestItCreatesModuleAccountOnInitBlock(t *testing.T) {
var accountKeeper keeper.AccountKeeper
app, err := simtestutil.SetupAtGenesis(
depinject.Configs(
testutil.AppConfig,
AppConfig,
depinject.Supply(log.NewNopLogger()),
),
&accountKeeper)
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/auth/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"cosmossdk.io/math"
authcli "cosmossdk.io/x/auth/client/cli"
authclitestutil "cosmossdk.io/x/auth/client/testutil"
authtestutil "cosmossdk.io/x/auth/testutil"
banktypes "cosmossdk.io/x/bank/types"
govtestutil "cosmossdk.io/x/gov/client/testutil"
govtypes "cosmossdk.io/x/gov/types/v1beta1"
Expand All @@ -28,6 +27,7 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
authtestkeeper "github.com/cosmos/cosmos-sdk/tests/e2e/auth/keeper"
"github.com/cosmos/cosmos-sdk/testutil"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/cosmos-sdk/testutil/network"
Expand Down Expand Up @@ -1293,7 +1293,7 @@ func TestGetBroadcastCommandOfflineFlag(t *testing.T) {

func TestGetBroadcastCommandWithoutOfflineFlag(t *testing.T) {
var txCfg client.TxConfig
err := depinject.Inject(authtestutil.AppConfig, &txCfg)
err := depinject.Inject(authtestkeeper.AppConfig, &txCfg)
require.NoError(t, err)
clientCtx := client.Context{}
clientCtx = clientCtx.WithTxConfig(txCfg)
Expand Down
4 changes: 2 additions & 2 deletions x/auth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.1.0
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
cosmossdk.io/x/tx v0.13.3
github.com/cometbft/cometbft v0.38.7
github.com/cosmos/cosmos-proto v1.0.0-beta.5
Expand All @@ -40,6 +38,8 @@ require (
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20240130113600-88ef6483f90f.1 // indirect
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 // indirect
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions x/auth/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk=
cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 h1:eb0kcGyaYHSS0do7+MIWg7UKlskSH01biRNENbm/zDA=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5/go.mod h1:drzY4oVisyWvSgpsM7ccQ7IX3efMuVIvd9Eij1Gm/6o=
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 h1:pVUfk/FJ5kIyXWma9UL0HgPWX+OoVKVK74Lf64oqVM8=
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91/go.mod h1:3WvOZSOMJR1NHudlw116khC3fm2RQHo7qSf/JsOVkRA=
cosmossdk.io/x/tx v0.13.3 h1:Ha4mNaHmxBc6RMun9aKuqul8yHiL78EKJQ8g23Zf73g=
cosmossdk.io/x/tx v0.13.3/go.mod h1:I8xaHv0rhUdIvIdptKIqzYy27+n2+zBVaxO6fscFhys=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
Expand Down
1 change: 0 additions & 1 deletion x/gov/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package gov_test

import (
"cosmossdk.io/math"
_ "cosmossdk.io/x/consensus"
"cosmossdk.io/x/gov/types/v1beta1"
stakingtypes "cosmossdk.io/x/staking/types"
)
Expand Down
3 changes: 1 addition & 2 deletions x/gov/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ require (

require (
cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/tx v0.13.3 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down Expand Up @@ -164,8 +165,6 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

require cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000

require cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect

replace github.com/cosmos/cosmos-sdk => ../../.
Expand Down

0 comments on commit fc310b6

Please sign in to comment.