diff --git a/tests/e2e/steps_partial_set_security.go b/tests/e2e/steps_partial_set_security.go index 40209b4c03..73bb929387 100644 --- a/tests/e2e/steps_partial_set_security.go +++ b/tests/e2e/steps_partial_set_security.go @@ -765,7 +765,7 @@ func stepsTopNChain() []Step { }, ChainID("provi"): ChainState{ HasToValidate: &map[ValidatorID][]ChainID{ - ValidatorID("alice"): {}, // alice has opted out and the epoch is over, so definitely doesnt have to validate anymore + ValidatorID("alice"): {}, // alice has opted out and the epoch is over, so definitely does not have to validate anymore ValidatorID("bob"): {"consu"}, ValidatorID("carol"): {"consu"}, }, diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 9b49728100..f8943e2642 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -1259,10 +1259,10 @@ func (k Keeper) HasToValidate( minPowerToOptIn := k.ComputeMinPowerToOptIn(ctx, chainID, k.stakingKeeper.GetLastValidators(ctx), topN) - if power > minPowerToOptIn { - return true, nil + if power < minPowerToOptIn { + return false, nil } - return false, nil + return true, nil } // SetConsumerCommissionRate sets a per-consumer chain commission rate