Skip to content

Commit

Permalink
Revert extra logging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Aug 28, 2024
1 parent 975d583 commit ec73f3e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions x/ccv/provider/keeper/partial_set_security.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ func (k Keeper) FulfillsMinStake(ctx sdk.Context, chainID string, providerAddr t

// ComputeNextValidators computes the validators for the upcoming epoch based on the currently `bondedValidators`.
func (k Keeper) ComputeNextValidators(ctx sdk.Context, chainID string, bondedValidators []stakingtypes.Validator) []types.ConsensusValidator {
k.Logger(ctx).Info("Computing next validators", "chainID", chainID, "bondedValidators", bondedValidators)
// sort the bonded validators by number of staked tokens in descending order
sort.Slice(bondedValidators, func(i, j int) bool {
return bondedValidators[i].GetBondedTokens().GT(bondedValidators[j].GetBondedTokens())
Expand All @@ -343,7 +342,6 @@ func (k Keeper) ComputeNextValidators(ctx sdk.Context, chainID string, bondedVal
// since those are the ones that participate in consensus
allowInactiveVals := k.AllowsInactiveValidators(ctx, chainID)
if !allowInactiveVals {
k.Logger(ctx).Info("Inactive validators are not allowed", "chainID", chainID)
// only leave the first MaxProviderConsensusValidators bonded validators
maxProviderConsensusVals := k.GetMaxProviderConsensusValidators(ctx)
if len(bondedValidators) > int(maxProviderConsensusVals) {
Expand All @@ -356,11 +354,6 @@ func (k Keeper) ComputeNextValidators(ctx sdk.Context, chainID string, bondedVal
return k.CanValidateChain(ctx, chainID, providerAddr) && k.FulfillsMinStake(ctx, chainID, providerAddr)
})

k.Logger(ctx).Info("Next validators after filter", "chainID", chainID, "nextValidators", nextValidators)

nextValidators = k.CapValidatorSet(ctx, chainID, nextValidators)

k.Logger(ctx).Info("Next validators after capping validator set", "chainID", chainID, "nextValidators", nextValidators)

return k.CapValidatorsPower(ctx, chainID, nextValidators)
}

0 comments on commit ec73f3e

Please sign in to comment.