From 167e3062cee9f1db8c53c040cbe0e56311fdb4ea Mon Sep 17 00:00:00 2001 From: Viacheslav Gonkivskyi Date: Wed, 31 Jan 2024 18:19:43 +0200 Subject: [PATCH] fix: divide headers amount by 100 --- sync/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/sync.go b/sync/sync.go index 2aa910bc..ffd0d5f9 100644 --- a/sync/sync.go +++ b/sync/sync.go @@ -319,7 +319,7 @@ func (s *Syncer[H]) requestHeaders( now := time.Now() to := fromHead.Height() + size + 1 headers, err := s.getter.GetRangeByHeight(ctx, fromHead, to) - s.metrics.getRangeRequestTime(s.ctx, time.Since(now), int(size), err != nil) + s.metrics.getRangeRequestTime(s.ctx, time.Since(now), int(size)/100, err != nil) if err != nil { return err }