Skip to content

Commit

Permalink
separate max
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed May 3, 2024
1 parent 9854843 commit 370c0fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relayer/processor/path_end_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,12 @@ func (pathEnd *pathEndRuntime) shouldSendPacketMessage(message packetIBCMessage,
zap.Uint64("sequence", sequence),
zap.Inline(k),
)
pathEnd.retryCount++
if pathEnd.retryCount >= maxMessageSendRetries {
if pathEnd.retryCount >= maxMessageSendRetriesIfChannelNotOpen {
pathEnd.removePacketRetention(counterparty, eventType, k, sequence)
pathEnd.retryCount = 0
return false
}
pathEnd.retryCount++
}
msgProcessCache, ok := pathEnd.packetProcessing[k]
if !ok {
Expand Down
3 changes: 3 additions & 0 deletions relayer/processor/path_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const (
// How many times to retry sending a message before giving up on it.
maxMessageSendRetries = 5

// How many times to retry sending a message if channel is not opened.
maxMessageSendRetriesIfChannelNotOpen = 1

// How many blocks of history to retain ibc headers in the cache for.
ibcHeadersToCache = 10

Expand Down

0 comments on commit 370c0fc

Please sign in to comment.