Merge PR #5005: Add support for halt-time
This commit is contained in:
+18
-4
@@ -18,9 +18,23 @@ type BaseConfig struct {
|
||||
// specified in this config (e.g. 0.25token1;0.0001token2).
|
||||
MinGasPrices string `mapstructure:"minimum-gas-prices"`
|
||||
|
||||
// HaltHeight contains a non-zero height at which a node will gracefully halt
|
||||
// and shutdown that can be used to assist upgrades and testing.
|
||||
// HaltHeight contains a non-zero block height at which a node will gracefully
|
||||
// halt and shutdown that can be used to assist upgrades and testing.
|
||||
//
|
||||
// Note: State will not be committed on the corresponding height and any logs
|
||||
// indicating such can be safely ignored.
|
||||
HaltHeight uint64 `mapstructure:"halt-height"`
|
||||
|
||||
// HaltTime contains a non-zero minimum block time (in Unix seconds) at which
|
||||
// a node will gracefully halt and shutdown that can be used to assist
|
||||
// upgrades and testing.
|
||||
//
|
||||
// Note: State will not be committed on the corresponding height and any logs
|
||||
// indicating such can be safely ignored.
|
||||
HaltTime uint64 `mapstructure:"halt-time"`
|
||||
|
||||
// InterBlockCache enables inter-block caching.
|
||||
InterBlockCache bool `mapstructure:"inter-block-cache"`
|
||||
}
|
||||
|
||||
// Config defines the server's top level configuration
|
||||
@@ -59,8 +73,8 @@ func (c *Config) GetMinGasPrices() sdk.DecCoins {
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
BaseConfig{
|
||||
MinGasPrices: defaultMinGasPrices,
|
||||
HaltHeight: 0,
|
||||
MinGasPrices: defaultMinGasPrices,
|
||||
InterBlockCache: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
+16
-2
@@ -18,9 +18,23 @@ const defaultConfigTemplate = `# This is a TOML config file.
|
||||
# specified in this config (e.g. 0.25token1;0.0001token2).
|
||||
minimum-gas-prices = "{{ .BaseConfig.MinGasPrices }}"
|
||||
|
||||
# HaltHeight contains a non-zero height at which a node will gracefully halt
|
||||
# and shutdown that can be used to assist upgrades and testing.
|
||||
# HaltHeight contains a non-zero block height at which a node will gracefully
|
||||
# halt and shutdown that can be used to assist upgrades and testing.
|
||||
#
|
||||
# Note: State will not be committed on the corresponding height and any logs
|
||||
# indicating such can be safely ignored.
|
||||
halt-height = {{ .BaseConfig.HaltHeight }}
|
||||
|
||||
# HaltTime contains a non-zero minimum block time (in Unix seconds) at which
|
||||
# a node will gracefully halt and shutdown that can be used to assist upgrades
|
||||
# and testing.
|
||||
#
|
||||
# Note: State will not be committed on the corresponding height and any logs
|
||||
# indicating such can be safely ignored.
|
||||
halt-time = {{ .BaseConfig.HaltTime }}
|
||||
|
||||
# InterBlockCache enables inter-block caching.
|
||||
inter-block-cache = {{ .BaseConfig.InterBlockCache }}
|
||||
`
|
||||
|
||||
var configTemplate *template.Template
|
||||
|
||||
Reference in New Issue
Block a user