fix: do not overwrite comet config when set in InterceptConfigsPreRunHandler (#16395)
This commit is contained in:
parent
b54bc7b2d4
commit
0bded0d195
@ -72,6 +72,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### Improvements
|
||||
|
||||
* (server) [#16395](https://github.com/cosmos/cosmos-sdk/pull/16395) Do not override some Comet config is purposely set differently in `InterceptConfigsPreRunHandler`.
|
||||
* (types) [#16076](https://github.com/cosmos/cosmos-sdk/pull/16076) Optimize `ChainAnteDecorators`/`ChainPostDecorators` to instantiate the functions once instead of on every invocation of the returned `AnteHandler`/`PostHandler`.
|
||||
* (client) [#16075](https://github.com/cosmos/cosmos-sdk/pull/16075) Partly revert [#15953](https://github.com/cosmos/cosmos-sdk/issues/15953) and `factory.Prepare` does nothing in offline mode.
|
||||
* (server) [#16071](https://github.com/cosmos/cosmos-sdk/pull/16071) When `mempool.max-txs` is set to a negative value, use a no-op mempool (effectively disable the app mempool).
|
||||
|
||||
@ -247,10 +247,16 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
|
||||
return nil, fmt.Errorf("error in config file: %w", err)
|
||||
}
|
||||
|
||||
conf.RPC.PprofListenAddress = "localhost:6060"
|
||||
conf.P2P.RecvRate = 5120000
|
||||
conf.P2P.SendRate = 5120000
|
||||
conf.Consensus.TimeoutCommit = 5 * time.Second
|
||||
defaultCometCfg := cmtcfg.DefaultConfig()
|
||||
// The SDK is opinionated about those comet values, so we set them here.
|
||||
// We verify first that the user has not changed them for not overriding them.
|
||||
if conf.Consensus.TimeoutCommit == defaultCometCfg.Consensus.TimeoutCommit {
|
||||
conf.Consensus.TimeoutCommit = 5 * time.Second
|
||||
}
|
||||
if conf.RPC.PprofListenAddress == defaultCometCfg.RPC.PprofListenAddress {
|
||||
conf.RPC.PprofListenAddress = "localhost:6060"
|
||||
}
|
||||
|
||||
cmtcfg.WriteConfigFile(cmtCfgFile, conf)
|
||||
|
||||
case err != nil:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user