deps: Update cosmos-sdk to v0.46.1 (#1300)

* Update cosmos-sdk to 0.46.1

* update gomod2nix.toml
This commit is contained in:
yihuang
2022-08-25 08:06:45 +02:00
committed by GitHub
parent 685869a141
commit f9c74e239c
8 changed files with 93 additions and 649 deletions
+6 -3
View File
@@ -291,8 +291,11 @@ func (c TLSConfig) Validate() error {
}
// GetConfig returns a fully parsed Config object.
func GetConfig(v *viper.Viper) Config {
cfg := config.GetConfig(v)
func GetConfig(v *viper.Viper) (Config, error) {
cfg, err := config.GetConfig(v)
if err != nil {
return Config{}, err
}
return Config{
Config: cfg,
@@ -321,7 +324,7 @@ func GetConfig(v *viper.Viper) Config {
CertificatePath: v.GetString("tls.certificate-path"),
KeyPath: v.GetString("tls.key-path"),
},
}
}, nil
}
// ParseConfig retrieves the default environment configuration for the
+3 -1
View File
@@ -55,7 +55,9 @@ func NewIndexTxCmd() *cobra.Command {
if err != nil {
return err
}
stateStore := sm.NewStore(stateDB)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardABCIResponses: cfg.Storage.DiscardABCIResponses,
})
indexBlock := func(height int64) error {
blk := blockStore.LoadBlock(height)
+5 -1
View File
@@ -280,7 +280,11 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty
return err
}
config := config.GetConfig(ctx.Viper)
config, err := config.GetConfig(ctx.Viper)
if err != nil {
logger.Error("failed to get server config", "error", err.Error())
return err
}
if err := config.ValidateBasic(); err != nil {
if strings.Contains(err.Error(), "set min gas price in app.toml or flag or env variable") {