diff --git a/.pending/bugfixes/modules/_fix-defaultunbondin b/.pending/bugfixes/modules/_fix-defaultunbondin new file mode 100644 index 0000000000..cd4c7ee97d --- /dev/null +++ b/.pending/bugfixes/modules/_fix-defaultunbondin @@ -0,0 +1 @@ +#4823 Update the `DefaultUnbondingTime` from 3 days to 3 weeks to be inline with documentation. diff --git a/x/staking/types/params.go b/x/staking/types/params.go index a2afa8a608..82e9c421c5 100644 --- a/x/staking/types/params.go +++ b/x/staking/types/params.go @@ -10,11 +10,12 @@ import ( "github.com/cosmos/cosmos-sdk/x/params" ) +// Staking params default values const ( // DefaultUnbondingTime reflects three weeks in seconds as the default // unbonding time. // TODO: Justify our choice of default here. - DefaultUnbondingTime time.Duration = time.Second * 60 * 60 * 24 * 3 + DefaultUnbondingTime time.Duration = time.Hour * 24 * 7 * 3 // Default maximum number of bonded validators DefaultMaxValidators uint16 = 100 @@ -42,6 +43,7 @@ type Params struct { BondDenom string `json:"bond_denom" yaml:"bond_denom"` // bondable coin denomination } +// NewParams creates a new Params instance func NewParams(unbondingTime time.Duration, maxValidators, maxEntries uint16, bondDenom string) Params {