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

fix(runtime): remove appv1alpha1.Config from runtime (backport #21042) #21079

Merged
merged 1 commit into from
Jul 26, 2024
Merged
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
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
Loading