From 803b4784ba07a11a46c4ac512bd5c48b357747b9 Mon Sep 17 00:00:00 2001 From: chris erway Date: Thu, 16 Nov 2023 14:58:57 -0500 Subject: [PATCH] increase followLatestBackoff to 100ms --- catchup/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catchup/service.go b/catchup/service.go index 8277324eaf..bcf204b134 100644 --- a/catchup/service.go +++ b/catchup/service.go @@ -49,7 +49,7 @@ const uncapParallelDownloadRate = time.Second // this should be at least the number of relays const catchupRetryLimit = 500 -const followLatestBackoff = 50 * time.Millisecond +const followLatestBackoff = 100 * time.Millisecond // ErrSyncRoundInvalid is returned when the sync round requested is behind the current ledger round var ErrSyncRoundInvalid = errors.New("requested sync round cannot be less than the latest round") @@ -332,7 +332,7 @@ func (s *Service) fetchAndWrite(ctx context.Context, r basics.Round, prevFetchCo // quit if the the same peer peer encountered errNoBlockForRound more than errNoBlockForRoundThreshold times if s.followLatest { // back off between retries to allow time for the next block to appear; - // this will provide 25s (catchupRetryLimit * followLatestBackoff) of + // this will provide 50s (catchupRetryLimit * followLatestBackoff) of // polling when continuously running catchup instead of agreement. time.Sleep(followLatestBackoff) } else {