simapp: rename MakeEncodingConfig to MakeTestEncodingConfig (#7681)
* simapp: rename MakeEncodingConfig to MakeTestEncodingConfig * Updating the Changelog + Adding DEPRECATED attribute. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
8014fc688e
commit
9bd42ace6b
|
@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||
* `Validator` update. Methods changed in `ValidatorI` (as described above) and `ToTmValidator` return error.
|
||||
* `Validator.ConsensusPubkey` type changed from `string` to `codectypes.Any`.
|
||||
* `MsgCreateValidator.Pubkey` type changed from `string` to `codectypes.Any`.
|
||||
* Deprecating and renaming `MakeEncodingConfig` to `MakeTestEncodingConfig` (both in `simapp` and `simapp/params` packages).
|
||||
|
||||
### Features
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
func TestMsgService(t *testing.T) {
|
||||
priv, _, _ := testdata.KeyTestPubAddr()
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
db := dbm.NewMemDB()
|
||||
app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder())
|
||||
app.SetInterfaceRegistry(encCfg.InterfaceRegistry)
|
||||
|
|
|
@ -39,7 +39,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
|||
app.BankKeeper.SetParams(sdkCtx, banktypes.DefaultParams())
|
||||
|
||||
// Set up TxConfig.
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig)
|
||||
|
||||
// Create new simulation server.
|
||||
|
|
|
@ -57,7 +57,7 @@ type TestSuite struct {
|
|||
}
|
||||
|
||||
func (s *TestSuite) SetupSuite() {
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
s.encCfg = encCfg
|
||||
s.protoCfg = tx.NewTxConfig(codec.NewProtoCodec(encCfg.InterfaceRegistry), tx.DefaultSignModes)
|
||||
s.aminoCfg = legacytx.StdTxConfig{Cdc: encCfg.Amino}
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func NewTestTxConfig() client.TxConfig {
|
||||
cfg := simapp.MakeEncodingConfig()
|
||||
cfg := simapp.MakeTestEncodingConfig()
|
||||
return cfg.TxConfig
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ var (
|
|||
},
|
||||
}
|
||||
|
||||
encodingConfig = simapp.MakeEncodingConfig()
|
||||
encodingConfig = simapp.MakeTestEncodingConfig()
|
||||
initClientCtx = client.Context{}.
|
||||
WithJSONMarshaler(encodingConfig.Marshaler).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -128,7 +128,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t
|
|||
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
db := dbm.NewMemDB()
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg)
|
||||
|
||||
serverCtx := server.NewDefaultContext()
|
||||
|
@ -149,7 +149,7 @@ func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *t
|
|||
|
||||
cmd := server.ExportCmd(
|
||||
func(_ log.Logger, _ dbm.DB, _ io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string) (types.ExportedApp, error) {
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
|
||||
var simApp *simapp.SimApp
|
||||
if height != -1 {
|
||||
|
|
|
@ -432,7 +432,7 @@ func NewSimApp(
|
|||
// simapp. It is useful for tests and clients who do not want to construct the
|
||||
// full simapp
|
||||
func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino) {
|
||||
config := MakeEncodingConfig()
|
||||
config := MakeTestEncodingConfig()
|
||||
return config.Marshaler, config.Amino
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
func TestSimAppExport(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig())
|
||||
app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig())
|
||||
|
||||
genesisState := NewDefaultGenesisState()
|
||||
stateBytes, err := json.MarshalIndent(genesisState, "", " ")
|
||||
|
@ -30,7 +30,7 @@ func TestSimAppExport(t *testing.T) {
|
|||
app.Commit()
|
||||
|
||||
// Making a new app object with the db, so that initchain hasn't been called
|
||||
app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig())
|
||||
app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig())
|
||||
_, err = app2.ExportAppStateAndValidators(false, []string{})
|
||||
require.NoError(t, err, "ExportAppStateAndValidators should not have an error")
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ func TestSimAppExport(t *testing.T) {
|
|||
// ensure that blocked addresses are properly set in bank keeper
|
||||
func TestBlockedAddrs(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig())
|
||||
app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig())
|
||||
|
||||
for acc := range maccPerms {
|
||||
require.Equal(t, !allowedReceivingModAcc[acc], app.BankKeeper.BlockedAddr(app.AccountKeeper.GetModuleAddress(acc)))
|
||||
|
|
|
@ -5,9 +5,12 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/std"
|
||||
)
|
||||
|
||||
// MakeEncodingConfig creates an EncodingConfig for testing
|
||||
func MakeEncodingConfig() simappparams.EncodingConfig {
|
||||
encodingConfig := simappparams.MakeEncodingConfig()
|
||||
// MakeTestEncodingConfig creates an EncodingConfig for testing.
|
||||
// This function should be used only internally (in the SDK).
|
||||
// App user should'nt create new codecs - use the app.AppCodec instead.
|
||||
// [DEPRECATED]
|
||||
func MakeTestEncodingConfig() simappparams.EncodingConfig {
|
||||
encodingConfig := simappparams.MakeTestEncodingConfig()
|
||||
std.RegisterLegacyAminoCodec(encodingConfig.Amino)
|
||||
std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
|
||||
ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino)
|
||||
|
|
|
@ -15,6 +15,6 @@ type GenesisState map[string]json.RawMessage
|
|||
|
||||
// NewDefaultGenesisState generates the default state for the application.
|
||||
func NewDefaultGenesisState() GenesisState {
|
||||
encCfg := MakeEncodingConfig()
|
||||
encCfg := MakeTestEncodingConfig()
|
||||
return ModuleBasics.DefaultGenesis(encCfg.Marshaler)
|
||||
}
|
||||
|
|
|
@ -8,8 +8,11 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx"
|
||||
)
|
||||
|
||||
// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
||||
func MakeEncodingConfig() EncodingConfig {
|
||||
// MakeTestEncodingConfig creates an EncodingConfig for an amino based test configuration.
|
||||
// This function should be used only internally (in the SDK).
|
||||
// App user should'nt create new codecs - use the app.AppCodec instead.
|
||||
// [DEPRECATED]
|
||||
func MakeTestEncodingConfig() EncodingConfig {
|
||||
cdc := codec.NewLegacyAmino()
|
||||
interfaceRegistry := types.NewInterfaceRegistry()
|
||||
marshaler := codec.NewAminoCodec(cdc)
|
||||
|
|
|
@ -8,8 +8,11 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||
)
|
||||
|
||||
// MakeEncodingConfig creates an EncodingConfig for a non-amino based test configuration.
|
||||
func MakeEncodingConfig() EncodingConfig {
|
||||
// MakeTestEncodingConfig creates an EncodingConfig for a non-amino based test configuration.
|
||||
// This function should be used only internally (in the SDK).
|
||||
// App user should'nt create new codecs - use the app.AppCodec instead.
|
||||
// [DEPRECATED]
|
||||
func MakeTestEncodingConfig() EncodingConfig {
|
||||
cdc := codec.NewLegacyAmino()
|
||||
interfaceRegistry := types.NewInterfaceRegistry()
|
||||
marshaler := codec.NewProtoCodec(interfaceRegistry)
|
||||
|
|
|
@ -27,7 +27,7 @@ func BenchmarkFullAppSimulation(b *testing.B) {
|
|||
}
|
||||
}()
|
||||
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), interBlockCacheOpt())
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt())
|
||||
|
||||
// run randomized simulation
|
||||
_, simParams, simErr := simulation.SimulateFromSeed(
|
||||
|
@ -72,7 +72,7 @@ func BenchmarkInvariants(b *testing.B) {
|
|||
}
|
||||
}()
|
||||
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), interBlockCacheOpt())
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt())
|
||||
|
||||
// run randomized simulation
|
||||
_, simParams, simErr := simulation.SimulateFromSeed(
|
||||
|
|
|
@ -68,7 +68,7 @@ func TestFullAppSimulation(t *testing.T) {
|
|||
require.NoError(t, os.RemoveAll(dir))
|
||||
}()
|
||||
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), fauxMerkleModeOpt)
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", app.Name())
|
||||
|
||||
// run randomized simulation
|
||||
|
@ -106,7 +106,7 @@ func TestAppImportExport(t *testing.T) {
|
|||
require.NoError(t, os.RemoveAll(dir))
|
||||
}()
|
||||
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), fauxMerkleModeOpt)
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", app.Name())
|
||||
|
||||
// Run randomized simulation
|
||||
|
@ -146,7 +146,7 @@ func TestAppImportExport(t *testing.T) {
|
|||
require.NoError(t, os.RemoveAll(newDir))
|
||||
}()
|
||||
|
||||
newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), fauxMerkleModeOpt)
|
||||
newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", newApp.Name())
|
||||
|
||||
var genesisState GenesisState
|
||||
|
@ -203,7 +203,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
|
|||
require.NoError(t, os.RemoveAll(dir))
|
||||
}()
|
||||
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), fauxMerkleModeOpt)
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", app.Name())
|
||||
|
||||
// Run randomized simulation
|
||||
|
@ -248,7 +248,7 @@ func TestAppSimulationAfterImport(t *testing.T) {
|
|||
require.NoError(t, os.RemoveAll(newDir))
|
||||
}()
|
||||
|
||||
newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), fauxMerkleModeOpt)
|
||||
newApp := NewSimApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), fauxMerkleModeOpt)
|
||||
require.Equal(t, "SimApp", newApp.Name())
|
||||
|
||||
newApp.InitChain(abci.RequestInitChain{
|
||||
|
@ -299,7 +299,7 @@ func TestAppStateDeterminism(t *testing.T) {
|
|||
}
|
||||
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeEncodingConfig(), interBlockCacheOpt())
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, FlagPeriodValue, MakeTestEncodingConfig(), interBlockCacheOpt())
|
||||
|
||||
fmt.Printf(
|
||||
"running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n",
|
||||
|
|
|
@ -38,7 +38,7 @@ import (
|
|||
// NewRootCmd creates a new root command for simd. It is called once in the
|
||||
// main function.
|
||||
func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
initClientCtx := client.Context{}.
|
||||
WithJSONMarshaler(encodingConfig.Marshaler).
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
|
@ -191,7 +191,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(server.FlagInvCheckPeriod)),
|
||||
simapp.MakeEncodingConfig(), // Ideally, we would reuse the one created by NewRootCmd.
|
||||
simapp.MakeTestEncodingConfig(), // Ideally, we would reuse the one created by NewRootCmd.
|
||||
baseapp.SetPruning(pruningOpts),
|
||||
baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))),
|
||||
baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))),
|
||||
|
@ -211,7 +211,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty
|
|||
func createSimappAndExport(
|
||||
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string,
|
||||
) (servertypes.ExportedApp, error) {
|
||||
encCfg := simapp.MakeEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd.
|
||||
encCfg := simapp.MakeTestEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd.
|
||||
encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
|
||||
var simApp *simapp.SimApp
|
||||
if height != -1 {
|
||||
|
|
|
@ -51,7 +51,7 @@ var DefaultConsensusParams = &abci.ConsensusParams{
|
|||
// Setup initializes a new SimApp. A Nop logger is set in SimApp.
|
||||
func Setup(isCheckTx bool) *SimApp {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeEncodingConfig())
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig())
|
||||
if !isCheckTx {
|
||||
// init chain must be called to stop deliverState from being nil
|
||||
genesisState := NewDefaultGenesisState()
|
||||
|
@ -79,7 +79,7 @@ func Setup(isCheckTx bool) *SimApp {
|
|||
// account. A Nop logger is set in SimApp.
|
||||
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeEncodingConfig())
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, MakeTestEncodingConfig())
|
||||
|
||||
genesisState := NewDefaultGenesisState()
|
||||
|
||||
|
@ -160,7 +160,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs
|
|||
// accounts and possible balances.
|
||||
func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig())
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeTestEncodingConfig())
|
||||
|
||||
// initialize the chain with the passed in genesis accounts
|
||||
genesisState := NewDefaultGenesisState()
|
||||
|
|
|
@ -94,7 +94,7 @@ type Config struct {
|
|||
// DefaultConfig returns a sane default configuration suitable for nearly all
|
||||
// testing requirements.
|
||||
func DefaultConfig() Config {
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
|
||||
return Config{
|
||||
Codec: encCfg.Marshaler,
|
||||
|
|
|
@ -307,7 +307,7 @@ func TestParseQueryParamBool(t *testing.T) {
|
|||
func TestPostProcessResponseBare(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
encodingConfig := simappparams.MakeEncodingConfig()
|
||||
encodingConfig := simappparams.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
WithLegacyAmino(encodingConfig.Amino) // amino used intentionally here
|
||||
|
|
|
@ -53,7 +53,7 @@ func (suite *AnteTestSuite) SetupTest(isCheckTx bool) {
|
|||
suite.ctx = suite.ctx.WithBlockHeight(1)
|
||||
|
||||
// Set up TxConfig.
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
// We're using TestMsg encoding in some tests, so register it here.
|
||||
encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil)
|
||||
testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry)
|
||||
|
|
|
@ -756,7 +756,7 @@ func (s *IntegrationTestSuite) TestGetAccountCmd() {
|
|||
|
||||
func TestGetBroadcastCommand_OfflineFlag(t *testing.T) {
|
||||
clientCtx := client.Context{}.WithOffline(true)
|
||||
clientCtx = clientCtx.WithTxConfig(simapp.MakeEncodingConfig().TxConfig)
|
||||
clientCtx = clientCtx.WithTxConfig(simapp.MakeTestEncodingConfig().TxConfig)
|
||||
|
||||
cmd := authcli.GetBroadcastCommand()
|
||||
_ = testutil.ApplyMockIODiscardOutErr(cmd)
|
||||
|
@ -767,7 +767,7 @@ func TestGetBroadcastCommand_OfflineFlag(t *testing.T) {
|
|||
|
||||
func TestGetBroadcastCommand_WithoutOfflineFlag(t *testing.T) {
|
||||
clientCtx := client.Context{}
|
||||
txCfg := simapp.MakeEncodingConfig().TxConfig
|
||||
txCfg := simapp.MakeTestEncodingConfig().TxConfig
|
||||
clientCtx = clientCtx.WithTxConfig(txCfg)
|
||||
|
||||
ctx := context.Background()
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
func TestGetCommandEncode(t *testing.T) {
|
||||
encodingConfig := simappparams.MakeEncodingConfig()
|
||||
encodingConfig := simappparams.MakeTestEncodingConfig()
|
||||
|
||||
cmd := GetEncodeCommand()
|
||||
_ = testutil.ApplyMockIODiscardOutErr(cmd)
|
||||
|
@ -49,7 +49,7 @@ func TestGetCommandEncode(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetCommandDecode(t *testing.T) {
|
||||
encodingConfig := simappparams.MakeEncodingConfig()
|
||||
encodingConfig := simappparams.MakeTestEncodingConfig()
|
||||
|
||||
clientCtx := client.Context{}.
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -55,7 +55,7 @@ func TestDefaultTxEncoder(t *testing.T) {
|
|||
|
||||
func TestReadTxFromFile(t *testing.T) {
|
||||
t.Parallel()
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
|
||||
txCfg := encodingConfig.TxConfig
|
||||
clientCtx := client.Context{}
|
||||
|
@ -90,7 +90,7 @@ func TestReadTxFromFile(t *testing.T) {
|
|||
|
||||
func TestBatchScanner_Scan(t *testing.T) {
|
||||
t.Parallel()
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
|
||||
txGen := encodingConfig.TxConfig
|
||||
clientCtx := client.Context{}
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -109,7 +109,7 @@ func TestSendNotEnoughBalance(t *testing.T) {
|
|||
|
||||
sendMsg := types.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 100)})
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, "", []uint64{origAccNum}, []uint64{origSeq}, false, false, priv1)
|
||||
require.Error(t, err)
|
||||
|
||||
|
@ -182,7 +182,7 @@ func TestSendToModuleAcc(t *testing.T) {
|
|||
origSeq := res1.GetSequence()
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{test.msg}, "", []uint64{origAccNum}, []uint64{origSeq}, test.expSimPass, test.expPass, priv1)
|
||||
if test.expPass {
|
||||
require.NoError(t, err)
|
||||
|
@ -256,7 +256,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) {
|
|||
|
||||
for _, tc := range testCases {
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
|
||||
if tc.expPass {
|
||||
require.NoError(t, err)
|
||||
|
@ -308,7 +308,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) {
|
|||
|
||||
for _, tc := range testCases {
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -363,7 +363,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) {
|
|||
|
||||
for _, tc := range testCases {
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -416,7 +416,7 @@ func TestMsgMultiSendDependent(t *testing.T) {
|
|||
|
||||
for _, tc := range testCases {
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ func BenchmarkOneBankSendTxPerBlock(b *testing.B) {
|
|||
require.NoError(b, err)
|
||||
|
||||
benchmarkApp.Commit()
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
|
||||
// Precompute all txs
|
||||
txs, err := simapp.GenSequenceOfTxs(txGen, []sdk.Msg{sendMsg1}, []uint64{0}, []uint64{uint64(0)}, b.N, priv1)
|
||||
|
@ -75,7 +75,7 @@ func BenchmarkOneBankMultiSendTxPerBlock(b *testing.B) {
|
|||
require.NoError(b, err)
|
||||
|
||||
benchmarkApp.Commit()
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
|
||||
// Precompute all txs
|
||||
txs, err := simapp.GenSequenceOfTxs(txGen, []sdk.Msg{multiSendMsg1}, []uint64{0}, []uint64{uint64(0)}, b.N, priv1)
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func (s *IntegrationTestSuite) TestCoinSend() {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
authclient.Codec = encodingConfig.Marshaler
|
||||
|
||||
val := s.network.Validators[0]
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -108,7 +108,7 @@ func sendMsgSend(
|
|||
return err
|
||||
}
|
||||
}
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -265,7 +265,7 @@ func sendMsgMultiSend(
|
|||
}
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
|
|
@ -27,7 +27,7 @@ var (
|
|||
|
||||
func createTestApp() (*simapp.SimApp, sdk.Context, []sdk.AccAddress) {
|
||||
db := dbm.NewMemDB()
|
||||
app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 1, simapp.MakeEncodingConfig())
|
||||
app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 1, simapp.MakeTestEncodingConfig())
|
||||
ctx := app.NewContext(true, tmproto.Header{})
|
||||
|
||||
constantFee := sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)
|
||||
|
|
|
@ -65,7 +65,7 @@ func Test_splitAndCall_Splitting(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestParseProposal(t *testing.T) {
|
||||
encodingConfig := params.MakeEncodingConfig()
|
||||
encodingConfig := params.MakeTestEncodingConfig()
|
||||
|
||||
okJSON, cleanup := testutil.WriteToNewTempFile(t, `
|
||||
{
|
||||
|
|
|
@ -100,7 +100,7 @@ func SimulateMsgSetWithdrawAddress(ak types.AccountKeeper, bk types.BankKeeper,
|
|||
|
||||
msg := types.NewMsgSetWithdrawAddress(simAccount.Address, simToAccount.Address)
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -152,7 +152,7 @@ func SimulateMsgWithdrawDelegatorReward(ak types.AccountKeeper, bk types.BankKee
|
|||
|
||||
msg := types.NewMsgWithdrawDelegatorReward(simAccount.Address, validator.GetOperator())
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -207,7 +207,7 @@ func SimulateMsgWithdrawValidatorCommission(ak types.AccountKeeper, bk types.Ban
|
|||
|
||||
msg := types.NewMsgWithdrawValidatorCommission(validator.GetOperator())
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -262,7 +262,7 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k
|
|||
}
|
||||
|
||||
msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address)
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -47,7 +47,7 @@ func (suite *GenTxTestSuite) SetupTest() {
|
|||
app := simapp.Setup(checkTx)
|
||||
suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{})
|
||||
suite.app = app
|
||||
suite.encodingConfig = simapp.MakeEncodingConfig()
|
||||
suite.encodingConfig = simapp.MakeTestEncodingConfig()
|
||||
|
||||
var err error
|
||||
amount := sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)
|
||||
|
|
|
@ -45,14 +45,14 @@ func TestValidateGenesisMultipleMessages(t *testing.T) {
|
|||
sdk.NewInt64Coin(sdk.DefaultBondDenom, 50), desc, comm, sdk.OneInt())
|
||||
require.NoError(t, err)
|
||||
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
txBuilder := txGen.NewTxBuilder()
|
||||
require.NoError(t, txBuilder.SetMsgs(msg1, msg2))
|
||||
|
||||
tx := txBuilder.GetTx()
|
||||
genesisState := types.NewGenesisStateFromTx(txGen.TxJSONEncoder(), []sdk.Tx{tx})
|
||||
|
||||
err = types.ValidateGenesis(genesisState, simapp.MakeEncodingConfig().TxConfig.TxJSONDecoder())
|
||||
err = types.ValidateGenesis(genesisState, simapp.MakeTestEncodingConfig().TxConfig.TxJSONDecoder())
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ func TestValidateGenesisBadMessage(t *testing.T) {
|
|||
|
||||
msg1 := stakingtypes.NewMsgEditValidator(sdk.ValAddress(pk1.Address()), desc, nil, nil)
|
||||
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
txBuilder := txGen.NewTxBuilder()
|
||||
err := txBuilder.SetMsgs(msg1)
|
||||
require.NoError(t, err)
|
||||
|
@ -69,7 +69,7 @@ func TestValidateGenesisBadMessage(t *testing.T) {
|
|||
tx := txBuilder.GetTx()
|
||||
genesisState := types.NewGenesisStateFromTx(txGen.TxJSONEncoder(), []sdk.Tx{tx})
|
||||
|
||||
err = types.ValidateGenesis(genesisState, simapp.MakeEncodingConfig().TxConfig.TxJSONDecoder())
|
||||
err = types.ValidateGenesis(genesisState, simapp.MakeTestEncodingConfig().TxConfig.TxJSONDecoder())
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ func TestGetPaginatedVotes(t *testing.T) {
|
|||
cdc = newTestCodec()
|
||||
)
|
||||
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
cli := TxSearchMock{txs: marshalled}
|
||||
clientCtx := client.Context{}.
|
||||
WithLegacyAmino(cdc).
|
||||
|
|
|
@ -68,7 +68,7 @@ func TestImportExportQueues(t *testing.T) {
|
|||
}
|
||||
|
||||
db := dbm.NewMemDB()
|
||||
app2 := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 0, simapp.MakeEncodingConfig())
|
||||
app2 := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig())
|
||||
|
||||
app2.InitChain(
|
||||
abci.RequestInitChain{
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -142,7 +142,7 @@ func SimulateMsgSubmitProposal(
|
|||
}
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -229,7 +229,7 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke
|
|||
}
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -291,7 +291,7 @@ func operationSimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k kee
|
|||
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate fees"), nil, err
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
|
|
@ -152,7 +152,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain {
|
|||
Time: globalStartTime,
|
||||
}
|
||||
|
||||
txConfig := simapp.MakeEncodingConfig().TxConfig
|
||||
txConfig := simapp.MakeTestEncodingConfig().TxConfig
|
||||
|
||||
// create an account to send transactions from
|
||||
chain := &TestChain{
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
func testComponents() (*codec.LegacyAmino, sdk.Context, sdk.StoreKey, sdk.StoreKey, paramskeeper.Keeper) {
|
||||
marshaler := simapp.MakeEncodingConfig().Marshaler
|
||||
marshaler := simapp.MakeTestEncodingConfig().Marshaler
|
||||
legacyAmino := createTestCodec()
|
||||
mkey := sdk.NewKVStoreKey("test")
|
||||
tkey := sdk.NewTransientStoreKey("transient_test")
|
||||
|
|
|
@ -76,7 +76,7 @@ func newTestInput(t *testing.T) testInput {
|
|||
err := cms.LoadLatestVersion()
|
||||
require.Nil(t, err)
|
||||
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
keeper := keeper.NewKeeper(encCfg.Marshaler, encCfg.Amino, keyParams, tKeyParams)
|
||||
ctx := sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger())
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ func (suite *SubspaceTestSuite) SetupTest() {
|
|||
ms.MountStoreWithDB(tkey, sdk.StoreTypeTransient, db)
|
||||
suite.NoError(ms.LoadLatestVersion())
|
||||
|
||||
encCfg := simapp.MakeEncodingConfig()
|
||||
encCfg := simapp.MakeTestEncodingConfig()
|
||||
ss := types.NewSubspace(encCfg.Marshaler, encCfg.Amino, key, tkey, "testsubspace")
|
||||
|
||||
suite.cdc = encCfg.Marshaler
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestSlashingMsgs(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, true, priv1)
|
||||
require.NoError(t, err)
|
||||
simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)})
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -90,7 +90,7 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee
|
|||
|
||||
msg := types.NewMsgUnjail(validator.GetOperator())
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
|
|
@ -71,7 +71,7 @@ func TestStakingMsgs(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
txGen := simapp.MakeEncodingConfig().TxConfig
|
||||
txGen := simapp.MakeTestEncodingConfig().TxConfig
|
||||
_, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, true, priv1)
|
||||
require.NoError(t, err)
|
||||
simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)})
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
func TestMigrate(t *testing.T) {
|
||||
encodingConfig := simapp.MakeEncodingConfig()
|
||||
encodingConfig := simapp.MakeTestEncodingConfig()
|
||||
clientCtx := client.Context{}.
|
||||
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
|
||||
WithTxConfig(encodingConfig.TxConfig).
|
||||
|
|
|
@ -153,7 +153,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k
|
|||
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to create CreateValidator message"), nil, err
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -224,7 +224,7 @@ func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k kee
|
|||
|
||||
msg := types.NewMsgEditValidator(address, description, &newCommissionRate, nil)
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -297,7 +297,7 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K
|
|||
|
||||
msg := types.NewMsgDelegate(simAccount.Address, val.GetOperator(), bondAmt)
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -387,7 +387,7 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper
|
|||
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate fees"), nil, err
|
||||
}
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
@ -500,7 +500,7 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k
|
|||
sdk.NewCoin(k.BondDenom(ctx), redAmt),
|
||||
)
|
||||
|
||||
txGen := simappparams.MakeEncodingConfig().TxConfig
|
||||
txGen := simappparams.MakeTestEncodingConfig().TxConfig
|
||||
tx, err := helpers.GenTx(
|
||||
txGen,
|
||||
[]sdk.Msg{msg},
|
||||
|
|
|
@ -40,7 +40,7 @@ var s TestSuite
|
|||
|
||||
func setupTest(height int64, skip map[int64]bool) TestSuite {
|
||||
db := dbm.NewMemDB()
|
||||
app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, skip, simapp.DefaultNodeHome, 0, simapp.MakeEncodingConfig())
|
||||
app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, skip, simapp.DefaultNodeHome, 0, simapp.MakeTestEncodingConfig())
|
||||
genesisState := simapp.NewDefaultGenesisState()
|
||||
stateBytes, err := json.MarshalIndent(genesisState, "", " ")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue