Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeouts #1088

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion relayer/processor/path_end_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,17 @@ func (pathEnd *pathEndRuntime) shouldSendPacketMessage(message packetIBCMessage,
return false
}

if message.info.Height >= counterparty.latestBlock.Height {
pathEndForHeight := counterparty
if eventType == chantypes.EventTypeTimeoutPacket || eventType == chantypes.EventTypeTimeoutPacketOnClose {
pathEndForHeight = pathEnd
}

if message.info.Height >= pathEndForHeight.latestBlock.Height {
pathEnd.log.Debug("Waiting to relay packet message until counterparty height has incremented",
zap.String("event_type", eventType),
zap.Uint64("sequence", sequence),
zap.Uint64("message_height", message.info.Height),
zap.Uint64("counterparty_height", counterparty.latestBlock.Height),
zap.Inline(k),
)
return false
Expand Down