eth/fetcher: fix copyloopvar for Go 1.22+ (#1505)

Co-authored-by: wit <wit765765346@gmail>
This commit is contained in:
wit liu 2025-09-17 08:21:23 +08:00 committed by GitHub
parent 7b92ec7d5a
commit 1b88f2588e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)