From 3960b66ebba078702979ed9709c94efffb790c02 Mon Sep 17 00:00:00 2001 From: pk910 Date: Mon, 23 Oct 2023 21:21:57 +0200 Subject: [PATCH] retry synchronization more often with more clients --- indexer/synchronizer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indexer/synchronizer.go b/indexer/synchronizer.go index 59526f54..cf10b15c 100644 --- a/indexer/synchronizer.go +++ b/indexer/synchronizer.go @@ -83,7 +83,11 @@ func (sync *synchronizerState) runSync() { // synchronize next epoch syncEpoch := sync.currentEpoch - lastRetry := retryCount >= 20 + retryLimit := len(sync.indexer.GetClients()) + if retryLimit < 30 { + retryLimit = 30 + } + lastRetry := retryCount >= retryLimit done, usedClient, err := sync.syncEpoch(syncEpoch, retryCount, lastRetry, skipClients) if done || lastRetry { if err != nil {