From e0ac654da5b200b1bed4ce8f61b5445477f2e1cf Mon Sep 17 00:00:00 2001
From: ledgerwatch <akhounov@gmail.com>
Date: Wed, 1 Jun 2022 23:45:06 +0100
Subject: [PATCH] Better diagnostics for anchorQueue (#4326)

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
---
 turbo/stages/headerdownload/header_algos.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/turbo/stages/headerdownload/header_algos.go b/turbo/stages/headerdownload/header_algos.go
index 22aac5d907..2c212d37b5 100644
--- a/turbo/stages/headerdownload/header_algos.go
+++ b/turbo/stages/headerdownload/header_algos.go
@@ -296,9 +296,9 @@ func (hd *HeaderDownload) logAnchorState() {
 		sb.WriteString(fmt.Sprintf(", anchorQueue.idx=%d", anchor.idx))
 		ss = append(ss, sb.String())
 	}
+	log.Info("anchorQueue", "len", hd.anchorQueue.Len())
 	sort.Strings(ss)
 	for _, s := range ss {
-		log.Info("anchorQueue", "len", hd.anchorQueue.Len())
 		log.Info(s)
 	}
 }
-- 
GitLab