Skip to content

Commit

Permalink
sub remove hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Jun 4, 2023
1 parent ee508e2 commit 10ce189
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/subscription/keeper/epoch_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down

0 comments on commit 10ce189

Please sign in to comment.