Skip to content

Commit

Permalink
fix(runtime): remove appv1alpha1.Config from runtime (cosmos#21042)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Jul 25, 2024
1 parent b6eaf70 commit 502450c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions runtime/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"

runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/legacy"
"cosmossdk.io/core/log"
Expand Down Expand Up @@ -51,7 +50,6 @@ type App struct {
baseAppOptions []BaseAppOption
msgServiceRouter *baseapp.MsgServiceRouter
grpcQueryRouter *baseapp.GRPCQueryRouter
appConfig *appv1alpha1.Config
logger log.Logger
// initChainer is the init chainer function defined by the app config.
// this is only required if the chain wants to add special InitChainer logic.
Expand Down
3 changes: 0 additions & 3 deletions runtime/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"google.golang.org/protobuf/reflect/protoregistry"

runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
"cosmossdk.io/core/app"
Expand Down Expand Up @@ -155,7 +154,6 @@ type AppInputs struct {
depinject.In

Logger log.Logger
AppConfig *appv1alpha1.Config
Config *runtimev1alpha1.Module
AppBuilder *AppBuilder
ModuleManager *module.Manager
Expand All @@ -168,7 +166,6 @@ func SetupAppBuilder(inputs AppInputs) {
app := inputs.AppBuilder.app
app.baseAppOptions = inputs.BaseAppOptions
app.config = inputs.Config
app.appConfig = inputs.AppConfig
app.logger = inputs.Logger
app.ModuleManager = inputs.ModuleManager
app.ModuleManager.RegisterInterfaces(inputs.InterfaceRegistry)
Expand Down
6 changes: 2 additions & 4 deletions runtime/v2/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"golang.org/x/exp/slices"

runtimev2 "cosmossdk.io/api/cosmos/app/runtime/v2"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
"cosmossdk.io/core/legacy"
"cosmossdk.io/core/log"
"cosmossdk.io/core/registry"
Expand Down Expand Up @@ -36,9 +35,8 @@ type App[T transaction.Tx] struct {
db Store

// app configuration
logger log.Logger
config *runtimev2.Module
appConfig *appv1alpha1.Config
logger log.Logger
config *runtimev2.Module

// modules configuration
storeKeys []string
Expand Down
2 changes: 0 additions & 2 deletions runtime/v2/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func ProvideAppBuilder[T transaction.Tx](
type AppInputs struct {
depinject.In

AppConfig *appv1alpha1.Config
Config *runtimev2.Module
AppBuilder *AppBuilder[transaction.Tx]
ModuleManager *MM[transaction.Tx]
Expand All @@ -157,7 +156,6 @@ type AppInputs struct {
func SetupAppBuilder(inputs AppInputs) {
app := inputs.AppBuilder.app
app.config = inputs.Config
app.appConfig = inputs.AppConfig
app.logger = inputs.Logger
app.moduleManager = inputs.ModuleManager
app.moduleManager.RegisterInterfaces(inputs.InterfaceRegistrar)
Expand Down

0 comments on commit 502450c

Please sign in to comment.