mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
fix issue #17534
This commit is contained in:
parent
c1c003e4ff
commit
de75f4296c
1 changed files with 2 additions and 2 deletions
|
|
@ -385,7 +385,7 @@ func (f *Fetcher) loop() {
|
||||||
|
|
||||||
// Create a closure of the fetch and schedule in on a new thread
|
// Create a closure of the fetch and schedule in on a new thread
|
||||||
fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes
|
fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes
|
||||||
go func() {
|
go func(fetchHeader headerRequesterFn, hashes []common.Hash) {
|
||||||
if f.fetchingHook != nil {
|
if f.fetchingHook != nil {
|
||||||
f.fetchingHook(hashes)
|
f.fetchingHook(hashes)
|
||||||
}
|
}
|
||||||
|
|
@ -393,7 +393,7 @@ func (f *Fetcher) loop() {
|
||||||
headerFetchMeter.Mark(1)
|
headerFetchMeter.Mark(1)
|
||||||
fetchHeader(hash) // Suboptimal, but protocol doesn't allow batch header retrievals
|
fetchHeader(hash) // Suboptimal, but protocol doesn't allow batch header retrievals
|
||||||
}
|
}
|
||||||
}()
|
}(fetchHeader, hashes)
|
||||||
}
|
}
|
||||||
// Schedule the next fetch if blocks are still pending
|
// Schedule the next fetch if blocks are still pending
|
||||||
f.rescheduleFetch(fetchTimer)
|
f.rescheduleFetch(fetchTimer)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue