Skip to content

Commit

Permalink
Merge branch 'shawn/throttle-with-retries-consumer-changes' of https:…
Browse files Browse the repository at this point in the history
…//github.com/cosmos/interchain-security into shawn/throttle-with-retries-consumer-changes
  • Loading branch information
shaspitz committed Aug 7, 2023
2 parents 6566b7c + 8c266f5 commit a670544
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 a670544

Please sign in to comment.