Skip to content

Commit

Permalink
camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Aug 10, 2023
1 parent 281527b commit 9ed7195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x/ccv/consumer/keeper/throttle_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
//

// Retry delay period could be implemented as a param, but 1 hour is reasonable
const RETRY_DELAY_PERIOD = time.Hour
const RetryDelayPeriod = time.Hour

// PacketSendingPermitted returns whether the consumer is allowed to send packets
// from the pending packets queue.
Expand All @@ -50,7 +50,7 @@ func (k Keeper) PacketSendingPermitted(ctx sdktypes.Context) bool {
return false
}
// If retry delay period has elapsed, we can send again
return ctx.BlockTime().After(record.SendTime.Add(RETRY_DELAY_PERIOD))
return ctx.BlockTime().After(record.SendTime.Add(RetryDelayPeriod))
}

func (k Keeper) UpdateSlashRecordOnSend(ctx sdktypes.Context) {
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/consumer/keeper/throttle_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestPacketSendingPermitted(t *testing.T) {
require.False(t, consumerKeeper.PacketSendingPermitted(ctx))

// Elapse retry delay period
ctx = ctx.WithBlockTime(ctx.BlockTime().Add(2 * consumerkeeper.RETRY_DELAY_PERIOD))
ctx = ctx.WithBlockTime(ctx.BlockTime().Add(2 * consumerkeeper.RetryDelayPeriod))

// Now packet sending is permitted again
require.True(t, consumerKeeper.PacketSendingPermitted(ctx))
Expand Down

0 comments on commit 9ed7195

Please sign in to comment.