From 39709fb3ceaf64014adf4ee1ca5b30b9b45a7f39 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 5 Dec 2024 21:47:32 +0800 Subject: [PATCH] register in query --- app/app.go | 4 ---- cmd/cronosd/cmd/root.go | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index d5cc46b3e4..04188c7703 100644 --- a/app/app.go +++ b/app/app.go @@ -851,10 +851,6 @@ func New( app.BasicModuleManager.RegisterLegacyAminoCodec(cdc) app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) - // for decoding legacy transactions whose messages are removed - RegisterLegacyCodec(encodingConfig.Amino) - RegisterLegacyInterfaces(encodingConfig.InterfaceRegistry) - // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. diff --git a/cmd/cronosd/cmd/root.go b/cmd/cronosd/cmd/root.go index 77cab2795f..ec2f5f07e2 100644 --- a/cmd/cronosd/cmd/root.go +++ b/cmd/cronosd/cmd/root.go @@ -67,6 +67,9 @@ func NewRootCmd() *cobra.Command { simtestutil.NewAppOptionsWithFlagHome(app.DefaultNodeHome), ) encodingConfig := tempApp.EncodingConfig() + // for decoding legacy transactions whose messages are removed + app.RegisterLegacyCodec(encodingConfig.Amino) + app.RegisterLegacyInterfaces(encodingConfig.InterfaceRegistry) initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry).