diff --git a/server/config/config.go b/server/config/config.go index 2e4b194633a8..b78133179889 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -318,6 +318,7 @@ func DefaultConfig() *Config { IAVLFastNodeModuleWhitelist: []string{"lockup"}, IAVLLazyLoading: false, AppDBBackend: "", + MaxEventSize: 0, }, Telemetry: telemetry.Config{ Enabled: false, @@ -383,6 +384,7 @@ func GetConfig(v *viper.Viper) (Config, error) { if err := v.Unmarshal(conf); err != nil { return Config{}, fmt.Errorf("error extracting app config: %w", err) } + sdk.MaxEventSize = conf.BaseConfig.MaxEventSize return *conf, nil } diff --git a/server/config/toml.go b/server/config/toml.go index 88873fed8d8d..96d02b0ff0b2 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -6,8 +6,6 @@ import ( "os" "text/template" - "github.com/cosmos/cosmos-sdk/types" - "github.com/spf13/viper" ) @@ -312,7 +310,6 @@ func init() { func ParseConfig(v *viper.Viper) (*Config, error) { conf := DefaultConfig() err := v.Unmarshal(conf) - types.MaxEventSize = conf.BaseConfig.MaxEventSize return conf, err }