From de75f4296cd051edfe27940044d7518a4453f7df Mon Sep 17 00:00:00 2001 From: etying Date: Tue, 28 Aug 2018 19:43:22 -0700 Subject: [PATCH] fix issue #17534 --- eth/fetcher/fetcher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/fetcher/fetcher.go b/eth/fetcher/fetcher.go index 277f14b81a..58ff43d83c 100644 --- a/eth/fetcher/fetcher.go +++ b/eth/fetcher/fetcher.go @@ -385,7 +385,7 @@ func (f *Fetcher) loop() { // Create a closure of the fetch and schedule in on a new thread fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes - go func() { + go func(fetchHeader headerRequesterFn, hashes []common.Hash) { if f.fetchingHook != nil { f.fetchingHook(hashes) } @@ -393,7 +393,7 @@ func (f *Fetcher) loop() { headerFetchMeter.Mark(1) fetchHeader(hash) // Suboptimal, but protocol doesn't allow batch header retrievals } - }() + }(fetchHeader, hashes) } // Schedule the next fetch if blocks are still pending f.rescheduleFetch(fetchTimer)