Skip to content

Commit

Permalink
change default commision rate and default commission max rate to 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding authored and lcwik committed Jan 17, 2024
1 parent c5c1050 commit f03a97c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions x/staking/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
14 changes: 7 additions & 7 deletions x/staking/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
},
}

Expand Down

0 comments on commit f03a97c

Please sign in to comment.