From beea0e6f998f0c412e0e6f506c11fa3e014a0bce Mon Sep 17 00:00:00 2001 From: Andrew Gouin Date: Fri, 21 Jul 2023 17:32:11 -0600 Subject: [PATCH] use max msgs for ack flush --- relayer/processor/path_processor.go | 2 +- relayer/processor/path_processor_internal.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/relayer/processor/path_processor.go b/relayer/processor/path_processor.go index fbc5eb714..3090a346c 100644 --- a/relayer/processor/path_processor.go +++ b/relayer/processor/path_processor.go @@ -30,7 +30,7 @@ const ( interchainQueryTimeout = 60 * time.Second // Amount of time between flushes if the previous flush failed. - flushFailureRetry = 15 * time.Second + flushFailureRetry = 10 * time.Second // If message assembly fails from either proof query failure on the source // or assembling the message for the destination, how many blocks should pass diff --git a/relayer/processor/path_processor_internal.go b/relayer/processor/path_processor_internal.go index 2f8983c54..54410fdf2 100644 --- a/relayer/processor/path_processor_internal.go +++ b/relayer/processor/path_processor_internal.go @@ -19,9 +19,8 @@ import ( // i.e. a MsgConnectionOpenInit or a MsgChannelOpenInit should be broadcasted to start // the handshake if this key exists in the relevant cache. const ( - preInitKey = "pre_init" - preCloseKey = "pre_close" - maxPacketsPerFlush = 10 + preInitKey = "pre_init" + preCloseKey = "pre_close" ) // getMessagesToSend returns only the lowest sequence message (if it should be sent) for ordered channels, @@ -1289,7 +1288,7 @@ SeqLoop: } dstMu.Unlock() - if i >= maxPacketsPerFlush { + if i >= int(pp.maxMsgs) { skipped = true break }