refactor!: use KVStoreService in x/consensus (#15517)

This commit is contained in:
Facundo Medica
2023-03-23 17:03:45 +00:00
committed by GitHub
parent 460bd0ad26
commit aeb4f02645
11 changed files with 67 additions and 50 deletions
+5 -5
View File
@@ -11,7 +11,7 @@ import (
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
store "cosmossdk.io/store/types"
storetypes "cosmossdk.io/core/store"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
@@ -139,9 +139,9 @@ func init() {
type ConsensusInputs struct {
depinject.In
Config *modulev1.Module
Cdc codec.Codec
Key *store.KVStoreKey
Config *modulev1.Module
Cdc codec.Codec
StoreService storetypes.KVStoreService
}
//nolint:revive
@@ -160,7 +160,7 @@ func ProvideModule(in ConsensusInputs) ConsensusOutputs {
authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
}
k := keeper.NewKeeper(in.Cdc, in.Key, authority.String())
k := keeper.NewKeeper(in.Cdc, in.StoreService, authority.String())
m := NewAppModule(in.Cdc, k)
baseappOpt := func(app *baseapp.BaseApp) {
app.SetParamStore(&k)