Skip to content

Commit

Permalink
use max msgs for ack flush
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Jul 21, 2023
1 parent 7ec30a3 commit beea0e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion relayer/processor/path_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions relayer/processor/path_processor_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1289,7 +1288,7 @@ SeqLoop:
}
dstMu.Unlock()

if i >= maxPacketsPerFlush {
if i >= int(pp.maxMsgs) {
skipped = true
break
}
Expand Down

0 comments on commit beea0e6

Please sign in to comment.