Skip to content

Commit

Permalink
Update x/ccv/consumer/keeper/throttle_retry.go
Browse files Browse the repository at this point in the history
Co-authored-by: Marius Poke <[email protected]>
  • Loading branch information
shaspitz and mpoke authored Aug 7, 2023
1 parent f5831c4 commit 8c266f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions x/ccv/consumer/keeper/throttle_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ func (k Keeper) PacketSendingPermitted(ctx sdktypes.Context) bool {
}
// Retry delay period could be implemented as a param, but 1 hour is reasonable
retryDelayPeriod := time.Hour
timeSinceSend := ctx.BlockTime().Sub(record.SendTime)
// If retry delay period has elapsed, we can send again
retryPeriodElapsed := timeSinceSend >= retryDelayPeriod
return retryPeriodElapsed
return ctx.BlockTime().After(record.SendTime.Add(retryDelayPeriod))
}

func (k Keeper) UpdateSlashRecordOnSend(ctx sdktypes.Context) {
Expand Down

0 comments on commit 8c266f5

Please sign in to comment.