From 1b88f2588eeef18ddd36e7069328b2125cdc6f75 Mon Sep 17 00:00:00 2001 From: wit liu <765765346@qq.com> Date: Wed, 17 Sep 2025 08:21:23 +0800 Subject: [PATCH] eth/fetcher: fix copyloopvar for Go 1.22+ (#1505) Co-authored-by: wit --- eth/fetcher/fetcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 04e9f9861d..ae0ead3e52 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -397,7 +397,7 @@ func (f *Fetcher) loop() { log.Trace("Fetching scheduled headers", "peer", peer, "list", hashes) // Create a closure of the fetch and schedule in on a new thread - fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes + fetchHeader := f.fetching[hashes[0]].fetchHeader go func() { if f.fetchingHook != nil { f.fetchingHook(hashes)