24 lines
619 B
Go
24 lines
619 B
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/cosmos/cosmos-sdk/x/distribution/types"
|
|
)
|
|
|
|
// get outstanding rewards
|
|
func (k Keeper) GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) (sdk.DecCoins, error) {
|
|
rewards, err := k.GetValidatorOutstandingRewards(ctx, val)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return rewards.Rewards, nil
|
|
}
|
|
|
|
// GetDistributionAccount returns the distribution ModuleAccount
|
|
func (k Keeper) GetDistributionAccount(ctx context.Context) sdk.ModuleAccountI {
|
|
return k.authKeeper.GetModuleAccount(ctx, types.ModuleName)
|
|
}
|