diff --git a/app/default_overrides.go b/app/default_overrides.go index 4b3fbdc884..dfc065e1c4 100644 --- a/app/default_overrides.go +++ b/app/default_overrides.go @@ -218,7 +218,8 @@ func DefaultConsensusConfig() *tmcfg.Config { // TODO: make TimeoutBroadcastTx configurable per https://github.com/celestiaorg/celestia-app/issues/1034 cfg.RPC.TimeoutBroadcastTxCommit = 50 * time.Second cfg.RPC.MaxBodyBytes = int64(8388608) // 8 MiB - cfg.Mempool.TTLNumBlocks = 10 + cfg.Mempool.TTLNumBlocks = 5 + cfg.Mempool.TTLDuration = time.Duration(cfg.Mempool.TTLNumBlocks) * appconsts.GoalBlockTime // Given that there is a stateful transaction size check in CheckTx, // We set a loose upper bound on what we expect the transaction to // be based on the upper bound size of the entire block for the given diff --git a/cmd/celestia-appd/cmd/root.go b/cmd/celestia-appd/cmd/root.go index 9db1f89430..91c86dc787 100644 --- a/cmd/celestia-appd/cmd/root.go +++ b/cmd/celestia-appd/cmd/root.go @@ -80,11 +80,14 @@ func NewRootCmd() *cobra.Command { return err } - // Override the default tendermint config for celestia-app - tmCfg := app.DefaultConsensusConfig() - customAppTemplate, customAppConfig := initAppConfig() - - err = server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, tmCfg) + // Override the default tendermint config and app config for celestia-app + var ( + tmCfg = app.DefaultConsensusConfig() + appConfig = app.DefaultAppConfig() + appTemplate = serverconfig.DefaultConfigTemplate + ) + + err = server.InterceptConfigsPreRunHandler(cmd, appTemplate, appConfig, tmCfg) if err != nil { return err } @@ -108,24 +111,6 @@ func NewRootCmd() *cobra.Command { return rootCmd } -// initAppConfig helps to override default appConfig template and configs. -// return "", nil if no custom configuration is required for the application. -func initAppConfig() (string, interface{}) { - type CustomAppConfig struct { - serverconfig.Config - } - - // Optionally allow the chain developer to overwrite the SDK's default - // server config. - srvCfg := app.DefaultAppConfig() - - CelestiaAppCfg := CustomAppConfig{Config: *srvCfg} - - CelestiaAppTemplate := serverconfig.DefaultConfigTemplate - - return CelestiaAppTemplate, CelestiaAppCfg -} - // setDefaultConsensusParams sets the default consensus parameters for the // embedded server context. func setDefaultConsensusParams(command *cobra.Command) error {