diff --git a/relayer/processor/path_end_runtime.go b/relayer/processor/path_end_runtime.go index b8187e28b..9765aad73 100644 --- a/relayer/processor/path_end_runtime.go +++ b/relayer/processor/path_end_runtime.go @@ -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 { diff --git a/relayer/processor/path_processor.go b/relayer/processor/path_processor.go index a6e31bd60..3cc2668da 100644 --- a/relayer/processor/path_processor.go +++ b/relayer/processor/path_processor.go @@ -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