From 9c28897bc15cc396a1fc89c6ec8831ae1e4354cf Mon Sep 17 00:00:00 2001 From: Teddy Ding Date: Fri, 30 Jun 2023 17:54:53 -0400 Subject: [PATCH] change default commision rate and default commission max rate to 100% --- x/staking/client/cli/tx.go | 4 ++-- x/staking/client/cli/tx_test.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 86ab1a81588..b9c22d91153 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -27,8 +27,8 @@ import ( var ( DefaultTokens = sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) defaultAmount = DefaultTokens.String() + sdk.DefaultBondDenom - defaultCommissionRate = "0.1" - defaultCommissionMaxRate = "0.2" + defaultCommissionRate = "1" + defaultCommissionMaxRate = "1" defaultCommissionMaxChangeRate = "0.01" defaultMinSelfDelegation = "1" ) diff --git a/x/staking/client/cli/tx_test.go b/x/staking/client/cli/tx_test.go index 77d4727606d..3903bf09f2f 100644 --- a/x/staking/client/cli/tx_test.go +++ b/x/staking/client/cli/tx_test.go @@ -105,42 +105,42 @@ func (s *CLITestSuite) TestPrepareConfigForTxCreateValidator() { { name: "all defaults", fsModify: func(fs *pflag.FlagSet) {}, - expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.2", "0.01", "1"), + expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "1", "1", "0.01", "1"), }, { name: "Custom amount", fsModify: func(fs *pflag.FlagSet) { require.NoError(fs.Set(cli.FlagAmount, "2000stake")) }, - expectedCfg: mkTxValCfg("2000stake", "0.1", "0.2", "0.01", "1"), + expectedCfg: mkTxValCfg("2000stake", "1", "1", "0.01", "1"), }, { name: "Custom commission rate", fsModify: func(fs *pflag.FlagSet) { require.NoError(fs.Set(cli.FlagCommissionRate, "0.54")) }, - expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.54", "0.2", "0.01", "1"), + expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.54", "1", "0.01", "1"), }, { name: "Custom commission max rate", fsModify: func(fs *pflag.FlagSet) { - require.NoError(fs.Set(cli.FlagCommissionMaxRate, "0.89")) + require.NoError(fs.Set(cli.FlagCommissionMaxRate, "1.89")) }, - expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.89", "0.01", "1"), + expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "1", "1.89", "0.01", "1"), }, { name: "Custom commission max change rate", fsModify: func(fs *pflag.FlagSet) { require.NoError(fs.Set(cli.FlagCommissionMaxChangeRate, "0.55")) }, - expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.2", "0.55", "1"), + expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "1", "1", "0.55", "1"), }, { name: "Custom min self delegations", fsModify: func(fs *pflag.FlagSet) { require.NoError(fs.Set(cli.FlagMinSelfDelegation, "0.33")) }, - expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "0.1", "0.2", "0.01", "0.33"), + expectedCfg: mkTxValCfg(cli.DefaultTokens.String()+sdk.DefaultBondDenom, "1", "1", "0.01", "0.33"), }, }