Skip to content

Commit

Permalink
manually cherry pick #2843
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Sep 7, 2024
1 parent 3744f64 commit 31b2071
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions zetaclient/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ func (oc *Orchestrator) ScheduleCctxEVM(
// #nosec G115 positive
outboundScheduleInterval := uint64(observer.GetChainParams().OutboundScheduleInterval)

// 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

for idx, cctx := range cctxList {
params := cctx.GetCurrentOutboundParam()
nonce := params.TssNonce
Expand Down Expand Up @@ -480,11 +486,6 @@ func (oc *Orchestrator) ScheduleCctxEVM(
continue
}

// 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++ {
Expand Down

0 comments on commit 31b2071

Please sign in to comment.