From e16afdccfc3bfe130c547a8fdbc9494239f3d16e Mon Sep 17 00:00:00 2001 From: ylsGit Date: Mon, 29 Nov 2021 19:22:45 +0800 Subject: [PATCH] =?UTF-8?q?Merge=20PR=20=EF=BC=9Afix=20replay=20(#1233)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update replay.go * Update replay.go --- cmd/exchaind/replay.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/exchaind/replay.go b/cmd/exchaind/replay.go index 8a815e81c2..3b350bdf1b 100644 --- a/cmd/exchaind/replay.go +++ b/cmd/exchaind/replay.go @@ -17,7 +17,6 @@ import ( storetypes "github.com/okex/exchain/libs/cosmos-sdk/store/types" sdk "github.com/okex/exchain/libs/cosmos-sdk/types" tmiavl "github.com/okex/exchain/libs/iavl" - iavlconfig "github.com/okex/exchain/libs/iavl/config" abci "github.com/okex/exchain/libs/tendermint/abci/types" "github.com/okex/exchain/libs/tendermint/mock" "github.com/okex/exchain/libs/tendermint/node" @@ -93,13 +92,13 @@ func replayCmd(ctx *server.Context) *cobra.Command { cmd.Flags().Bool(sm.FlagParalleledTx, false, "pall Tx") cmd.Flags().Bool(saveBlock, false, "save block when replay") cmd.Flags().Int64(config.FlagMaxGasUsedPerBlock, -1, "Maximum gas used of transactions in a block") - config.RegisterDynamicConfig(ctx.Logger.With("module", "config")) + return cmd } // replayBlock replays blocks from db, if something goes wrong, it will panic with error message. func replayBlock(ctx *server.Context, originDataDir string) { - iavlconfig.SetDynamicConfig(config.GetOecConfig()) + config.RegisterDynamicConfig(ctx.Logger.With("module", "config")) proxyApp, err := createProxyApp(ctx) panicError(err)