From d25ea9fbf3725a7bc2f9bce9fa33ba97eb817dfb Mon Sep 17 00:00:00 2001 From: roman Date: Mon, 25 Sep 2023 13:51:16 -0400 Subject: [PATCH] update comments --- x/incentives/keeper/gauge.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x/incentives/keeper/gauge.go b/x/incentives/keeper/gauge.go index a69110d8282..fcf943b7563 100644 --- a/x/incentives/keeper/gauge.go +++ b/x/incentives/keeper/gauge.go @@ -121,8 +121,8 @@ func (k Keeper) SetGaugeWithRefKey(ctx sdk.Context, gauge *types.Gauge) error { // policy created by a group data structure. It is expected to be created via CreateGroup keeper method. // For this gauge, the pool id must be 0. Fails if not. // -// For all gauges, errors if: -// - numEpochsPaidOver is 0 +// Retruns error if: +// - attempts to create non-perpetual gauge with numEpochsPaidOver of 0 // // On success, returns the gauge ID. func (k Keeper) CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddress, coins sdk.Coins, distrTo lockuptypes.QueryCondition, startTime time.Time, numEpochsPaidOver uint64, poolId uint64) (uint64, error) { @@ -238,11 +238,10 @@ func (k Keeper) CreateGauge(ctx sdk.Context, isPerpetual bool, owner sdk.AccAddr // Note, that implies that only perpetual pool gauges can be associated with the Group. // For Group's own distribution policy, a 1:1 group Gauge is created. This is the Gauge that receives incentives at the end of an epoch // in the pool incentives as defined by the DistrRecord. The Group's Gauge can either be perpetual or non-perpetual. -// If numEpochPaidOver is 1, then the Group's Gauge is perpetual. Otherwise, it is non-perpetual. +// If numEpochPaidOver is 0, then the Group's Gauge is perpetual. Otherwise, it is non-perpetual. // Returns nil on success. // Returns error if: // - given pool IDs slice is empty or has 1 pool only -// - numEpochPaidOver is 0 // - fails to initialize gauge information for every pool ID // - fails to send coins from owner to the incentives module for the Group's Gauge // - fails to set the Group's Gauge to state