diff --git a/x/subscription/keeper/epoch_start.go b/x/subscription/keeper/epoch_start.go index 875d7d94f5..4800cade7b 100644 --- a/x/subscription/keeper/epoch_start.go +++ b/x/subscription/keeper/epoch_start.go @@ -37,9 +37,6 @@ func (k Keeper) EpochStart(ctx sdk.Context) { }) for _, sub := range subExpired { - sub.PrevExpiryBlock = block - sub.PrevCuLeft = sub.MonthCuLeft - // subscription has been dead for EpochsToSave epochs: delete // TODO: disable all projects registered in this subscription // TODO: THIS WILL BE HANDLED AUTOMATICALLY BY FIXATION-STORE @@ -49,6 +46,9 @@ func (k Keeper) EpochStart(ctx sdk.Context) { continue } + sub.PrevExpiryBlock = block + sub.PrevCuLeft = sub.MonthCuLeft + if sub.DurationLeft == 0 { panic("Subscription: EpochStart: negative DurationLeft for consumer " + sub.Consumer) }