From bc653fe27840a59585b40f6dc2934280cd460c35 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 3 May 2024 09:34:27 +0800 Subject: [PATCH] separate max --- relayer/processor/path_end_runtime.go | 2 +- relayer/processor/path_processor.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/relayer/processor/path_end_runtime.go b/relayer/processor/path_end_runtime.go index b8187e28b8..d2cee43e8c 100644 --- a/relayer/processor/path_end_runtime.go +++ b/relayer/processor/path_end_runtime.go @@ -562,7 +562,7 @@ func (pathEnd *pathEndRuntime) shouldSendPacketMessage(message packetIBCMessage, zap.Inline(k), ) pathEnd.retryCount++ - if pathEnd.retryCount >= maxMessageSendRetries { + if pathEnd.retryCount >= maxMessageSendRetriesIfChannelNotOpen { pathEnd.removePacketRetention(counterparty, eventType, k, sequence) pathEnd.retryCount = 0 return false diff --git a/relayer/processor/path_processor.go b/relayer/processor/path_processor.go index a6e31bd600..3cc2668dad 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