Skip to content

Commit

Permalink
fix: implement block retry in channel and packet as well
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksharmapoudel committed Jul 14, 2023
1 parent 9cfacac commit 137a645
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions relayer/processor/path_end_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ func (pathEnd *pathEndRuntime) shouldSendPacketMessage(message packetIBCMessage,
// this message was sent less than blocksToRetrySendAfter ago, do not attempt to send again yet.
return false
}
if inProgress.retryCount <= 1 && blocksSinceLastProcessed < pathEnd.chainProvider.FirstRetryBlockAfter() {
return false
}

Check warning on line 497 in relayer/processor/path_end_runtime.go

View check run for this annotation

Codecov / codecov/patch

relayer/processor/path_end_runtime.go#L495-L497

Added lines #L495 - L497 were not covered by tests
} else {
if blocksSinceLastProcessed < blocksToRetryAssemblyAfter {
// this message was sent less than blocksToRetryAssemblyAfter ago, do not attempt assembly again yet.
Expand Down Expand Up @@ -657,6 +660,9 @@ func (pathEnd *pathEndRuntime) shouldSendChannelMessage(message channelIBCMessag
// this message was sent less than blocksToRetrySendAfter ago, do not attempt to send again yet.
return false
}
if inProgress.retryCount <= 1 && blocksSinceLastProcessed < pathEnd.chainProvider.FirstRetryBlockAfter() {
return false
}

Check warning on line 665 in relayer/processor/path_end_runtime.go

View check run for this annotation

Codecov / codecov/patch

relayer/processor/path_end_runtime.go#L663-L665

Added lines #L663 - L665 were not covered by tests
} else {
if blocksSinceLastProcessed < blocksToRetryAssemblyAfter {
// this message was sent less than blocksToRetryAssemblyAfter ago, do not attempt assembly again yet.
Expand Down

0 comments on commit 137a645

Please sign in to comment.