From 0fec74893d9d2f076573c946dc5da0c33c87e4c2 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 31 Jul 2019 16:46:45 +0200 Subject: [PATCH] Merge PR #4823: fix DefaultUnbondingTime --- .pending/bugfixes/modules/_fix-defaultunbondin | 1 + x/staking/types/params.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .pending/bugfixes/modules/_fix-defaultunbondin diff --git a/.pending/bugfixes/modules/_fix-defaultunbondin b/.pending/bugfixes/modules/_fix-defaultunbondin new file mode 100644 index 000000000..cd4c7ee97 --- /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 a2afa8a60..82e9c421c 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 {