Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
This commit is contained in:
@@ -39,6 +39,10 @@ type BaseConfig struct {
|
||||
// specified in this config (e.g. 0.25token1;0.0001token2).
|
||||
MinGasPrices string `mapstructure:"minimum-gas-prices"`
|
||||
|
||||
// The maximum amount of gas a grpc/Rest query may consume.
|
||||
// If set to 0, it is unbounded.
|
||||
QueryGasLimit uint64 `mapstructure:"query-gas-limit"`
|
||||
|
||||
Pruning string `mapstructure:"pruning"`
|
||||
PruningKeepRecent string `mapstructure:"pruning-keep-recent"`
|
||||
PruningInterval string `mapstructure:"pruning-interval"`
|
||||
@@ -225,6 +229,7 @@ func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
BaseConfig: BaseConfig{
|
||||
MinGasPrices: defaultMinGasPrices,
|
||||
QueryGasLimit: 0,
|
||||
InterBlockCache: true,
|
||||
Pruning: pruningtypes.PruningOptionDefault,
|
||||
PruningKeepRecent: "0",
|
||||
|
||||
@@ -21,6 +21,10 @@ const DefaultConfigTemplate = `# This is a TOML config file.
|
||||
# specified in this config (e.g. 0.25token1;0.0001token2).
|
||||
minimum-gas-prices = "{{ .BaseConfig.MinGasPrices }}"
|
||||
|
||||
# The maximum gas a query coming over rest/grpc may consume.
|
||||
# If this is set to zero, the query can consume an unbounded amount of gas.
|
||||
query-gas-limit = "{{ .BaseConfig.QueryGasLimit }}"
|
||||
|
||||
# default: the last 362880 states are kept, pruning at 10 block intervals
|
||||
# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node)
|
||||
# everything: 2 latest states will be kept; pruning at 10 block intervals.
|
||||
|
||||
Reference in New Issue
Block a user