melekes comment

This commit is contained in:
rigelrozanski 2018-08-30 21:16:23 -04:00
parent 8d02c3eba0
commit d900c583ff

View File

@ -420,9 +420,10 @@ func (v Validator) BondedTokens() sdk.Dec {
// Returns if the validator should be considered unbonded
func (v Validator) IsUnbonded(ctx sdk.Context) bool {
if v.Status == sdk.Unbonded {
switch v.Status {
case sdk.Unbonded:
return true
} else if v.Status == sdk.Unbonding {
case sdk.Unbonding:
ctxTime := ctx.BlockHeader().Time
if ctxTime.After(v.UnbondingMinTime) {
return true