Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Jul 18, 2024
1 parent a7a8c96 commit d6bcfe0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions x/ccv/provider/keeper/staking_keeper_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)

// Iterates over the consensus-active validators by power.
// IterateBondedValidatorsByPower iterates over the consensus-active validators by power.
// The same as IterateBondedValidatorsByPower in the StakingKeeper,
// but only returns the first MaxProviderConsensusValidators validators.
// This is used to implement the interface of the staking keeper to interface with
Expand All @@ -25,10 +25,9 @@ func (k Keeper) IterateBondedValidatorsByPower(ctx context.Context, fn func(inde
})
}

// Gets the amount of bonded tokens, which is equal
// to the amount of tokens of the consensus-active validators.
// The same as TotalBondedTokens, but only counts
// tokens of the first MaxProviderConsensusValidators validators.
// TotalBondedTokens gets the amount of tokens of the consensus-active validators.
// The same as TotalBondedTokens in the StakingKeeper, but only counts bonded tokens
// of the first MaxProviderConsensusValidators bonded validators.
// This is used to implement the interface of the staking keeper to interface with
// modules that need to reference the consensus-active validators.
func (k Keeper) TotalBondedTokens(ctx context.Context) (math.Int, error) {
Expand All @@ -44,21 +43,21 @@ func (k Keeper) TotalBondedTokens(ctx context.Context) (math.Int, error) {
return totalBondedTokens, nil
}

// The same as IterateDelegations in the StakingKeeper.
// IterateDelegations is the same as IterateDelegations in the StakingKeeper.
// Necessary to implement the interface of the staking keeper to interface with
// other modules.
func (k Keeper) IterateDelegations(ctx context.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) error {
return k.stakingKeeper.IterateDelegations(ctx, delegator, fn)
}

// The same as StakingTotalSupply in the StakingKeeper.
// StakingTokenSupply is the same as StakingTotalSupply in the StakingKeeper.
// Necessary to implement the interface of the staking keeper to interface with
// other modules.
func (k Keeper) StakingTokenSupply(ctx context.Context) (math.Int, error) {
return k.stakingKeeper.StakingTokenSupply(ctx)
}

// Gets the ratio of tokens staked to validators active in the consensus
// BondedRatio gets the ratio of tokens staked to validators active in the consensus
// to the total supply of tokens.
// Same as BondedRatio in the StakingKeeper, but only counts
// tokens of the first MaxProviderConsensusValidators bonded validators.
Expand Down

0 comments on commit d6bcfe0

Please sign in to comment.