chore: remove consensus as a direct dependency (#20274)

This commit is contained in:
Marko 2024-05-06 11:42:47 +02:00 committed by GitHub
parent a52f8314c8
commit fc310b6198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 15 additions and 18 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
package testutil
package keeper
import (
_ "cosmossdk.io/x/accounts" // import as blank for app wiring

View File

@ -1,4 +1,4 @@
package keeper_test
package keeper
import (
"testing"
@ -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"
@ -20,7 +19,7 @@ func BenchmarkAccountMapperGetAccountFound(b *testing.B) {
app, err := simtestutil.Setup(
depinject.Configs(
depinject.Supply(log.NewNopLogger()),
testutil.AppConfig,
AppConfig,
),
&accountKeeper,
)
@ -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)

View File

@ -1,4 +1,4 @@
package auth_test
package keeper
import (
"testing"
@ -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"
@ -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)

View File

@ -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"
@ -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"
@ -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)

View File

@ -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
@ -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

View File

@ -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=

View File

@ -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"
)

View File

@ -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
@ -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 => ../../.