Skip to content

Commit

Permalink
chore: fix the compiler error breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Oct 23, 2024
1 parent a38bb30 commit 0692d82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/core/04-channel/v2/keeper/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (k *Keeper) sendPacket(
return 0, "", err
}

// client timestamps are in nanoseconds while packet timeouts are in seconds
// thus to compare them, we convert the packet timeout to nanoseconds
// client timestamps are in nanoseconds while packet timeouts are in seconds
// thus to compare them, we convert the packet timeout to nanoseconds
timeoutTimestamp = types.TimeoutTimestampToNanos(packet.TimeoutTimestamp)
if latestTimestamp >= timeoutTimestamp {
return 0, "", errorsmod.Wrapf(channeltypes.ErrTimeoutElapsed, "latest timestamp: %d, timeout timestamp: %d", latestTimestamp, timeoutTimestamp)
Expand Down Expand Up @@ -120,7 +120,7 @@ func (k *Keeper) recvPacket(
sdkCtx := sdk.UnwrapSDKContext(ctx)
currentTimestamp := uint64(sdkCtx.BlockTime().Unix())
if currentTimestamp >= packet.TimeoutTimestamp {
return errorsmod.Wrapf(channeltypes.ErrTimeoutElapsed, "current timestamp: %d, timeout timestamp: %d", currentTimestamp, timeoutTimestamp)
return errorsmod.Wrapf(channeltypes.ErrTimeoutElapsed, "current timestamp: %d, timeout timestamp: %d", currentTimestamp, packet.TimeoutTimestamp)
}

// REPLAY PROTECTION: Packet receipts will indicate that a packet has already been received
Expand Down

0 comments on commit 0692d82

Please sign in to comment.