From 53695f8118dd862e7941e64df9ef47636f8b7f02 Mon Sep 17 00:00:00 2001 From: lumtis Date: Wed, 4 Oct 2023 15:37:01 -0700 Subject: [PATCH] refactor: change default mempool version in config --- cmd/zetacored/root.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/zetacored/root.go b/cmd/zetacored/root.go index 84713de816..82a146c582 100644 --- a/cmd/zetacored/root.go +++ b/cmd/zetacored/root.go @@ -92,7 +92,7 @@ func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) { customAppTemplate, customAppConfig := initAppConfig() - return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, tmcfg.DefaultConfig()) + return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, initTmConfig()) }, } @@ -107,6 +107,18 @@ func initAppConfig() (string, interface{}) { return servercfg.AppConfig(zetacoredconfig.BaseDenom) } +// initTmConfig overrides the default Tendermint config +func initTmConfig() *tmcfg.Config { + cfg := tmcfg.DefaultConfig() + + // use mempool version 1 to enable tx priority + if cfg.Mempool != nil { + cfg.Mempool.Version = tmcfg.MempoolV1 + } + + return cfg +} + func initRootCmd(rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig) { rootCmd.AddCommand( ethermintclient.ValidateChainID(