From 25cace81644e013e9c84a663297a21773c0469fd Mon Sep 17 00:00:00 2001 From: lumtis Date: Mon, 9 Sep 2024 18:54:35 -0700 Subject: [PATCH] fix: schedule interval out of loop --- zetaclient/orchestrator/orchestrator.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zetaclient/orchestrator/orchestrator.go b/zetaclient/orchestrator/orchestrator.go index 9b2ced55bb..43864f514f 100644 --- a/zetaclient/orchestrator/orchestrator.go +++ b/zetaclient/orchestrator/orchestrator.go @@ -453,6 +453,9 @@ func (oc *Orchestrator) ScheduleCctxEVM( // #nosec G115 positive outboundScheduleInterval := uint64(observer.GetChainParams().OutboundScheduleInterval) + criticalInterval := uint64(10) // for critical pending outbound we reduce re-try interval + nonCriticalInterval := outboundScheduleInterval * 2 // for non-critical pending outbound we increase re-try interval + for idx, cctx := range cctxList { params := cctx.GetCurrentOutboundParam() nonce := params.TssNonce @@ -486,8 +489,6 @@ func (oc *Orchestrator) ScheduleCctxEVM( // determining critical outbound; if it satisfies following criteria // 1. it's the first pending outbound for this chain // 2. the following 5 nonces have been in tracker - criticalInterval := uint64(10) // for critical pending outbound we reduce re-try interval - nonCriticalInterval := outboundScheduleInterval * 2 // for non-critical pending outbound we increase re-try interval if nonce%criticalInterval == zetaHeight%criticalInterval { count := 0 for i := nonce + 1; i <= nonce+10; i++ {