Skip to content

Commit

Permalink
Disable invariant check when max validators != max provider consensus…
Browse files Browse the repository at this point in the history
… validators
  • Loading branch information
p-offtermatt committed Jul 26, 2024
1 parent af528c7 commit 74b4b94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/ccv/provider/keeper/invariants.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ func StakingKeeperEquivalenceInvariant(k Keeper) sdk.Invariant {
if maxValidators != uint32(maxProviderConsensusValidators) {
// the invariant should only check something if these two numbers are equal,
// so skip in this case
k.Logger(ctx).Info("skipping staking keeper equivalence invariant check because max validators is equal to max provider consensus validators")
return sdk.FormatInvariant(types.ModuleName, "staking-keeper-equivalence",
fmt.Sprintf("maxValidators: %v, maxProviderVals: %v", maxValidators, maxProviderConsensusValidators)), true
fmt.Sprintf("maxValidators: %v, maxProviderVals: %v", maxValidators, maxProviderConsensusValidators)), false
}

// check that the staking keeper and the provider keeper return the same values
Expand Down

0 comments on commit 74b4b94

Please sign in to comment.