forked from cerc-io/laconicd-deprecated
encoding: fix test (#64)
This commit is contained in:
@@ -38,12 +38,13 @@ import (
|
||||
|
||||
"github.com/cosmos/ethermint/app"
|
||||
ethermintclient "github.com/cosmos/ethermint/client"
|
||||
"github.com/cosmos/ethermint/encoding"
|
||||
)
|
||||
|
||||
// NewRootCmd creates a new root command for simd. It is called once in the
|
||||
// main function.
|
||||
func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
encodingConfig := app.MakeEncodingConfig()
|
||||
encodingConfig := encoding.MakeConfig(app.ModuleBasics)
|
||||
initClientCtx := client.Context{}.
|
||||
WithJSONMarshaler(encodingConfig.Marshaler).
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
@@ -225,7 +226,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty
|
||||
logger, db, traceStore, true, skipUpgradeHeights,
|
||||
cast.ToString(appOpts.Get(flags.FlagHome)),
|
||||
cast.ToUint(appOpts.Get(sdkserver.FlagInvCheckPeriod)),
|
||||
app.MakeEncodingConfig(), // Ideally, we would reuse the one created by NewRootCmd.
|
||||
encoding.MakeConfig(app.ModuleBasics), // Ideally, we would reuse the one created by NewRootCmd.
|
||||
appOpts,
|
||||
baseapp.SetPruning(pruningOpts),
|
||||
baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(sdkserver.FlagMinGasPrices))),
|
||||
@@ -249,7 +250,7 @@ func createAppAndExport(
|
||||
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string,
|
||||
appOpts servertypes.AppOptions,
|
||||
) (servertypes.ExportedApp, error) {
|
||||
encCfg := app.MakeEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd.
|
||||
encCfg := encoding.MakeConfig(app.ModuleBasics) // Ideally, we would reuse the one created by NewRootCmd.
|
||||
encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
|
||||
var ethermintApp *app.EthermintApp
|
||||
if height != -1 {
|
||||
|
||||
Reference in New Issue
Block a user