Merge PR #4823: fix DefaultUnbondingTime

This commit is contained in:
Federico Kunze 2019-07-31 16:46:45 +02:00 committed by Alexander Bezobchuk
parent 8f09f1e2b3
commit 0fec74893d
2 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1 @@
#4823 Update the `DefaultUnbondingTime` from 3 days to 3 weeks to be inline with documentation.

View File

@ -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 {