eth/downloader: minor change, don't set progress unless progress...

This commit is contained in:
Martin Holst Swende 2019-11-08 14:55:29 +01:00
parent 88ebb3c533
commit e3d4a09150
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -509,10 +509,6 @@ func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common
if throttle {
// There are no resultslots available. Put it back in the task queue
taskQueue.Push(header, -int64(header.Number.Uint64()))
// Set progress to true -- otherwise the peer will get
// penalized for not 'accepting' requests, while in fact it's
// because we don't have room for more results right now
progress = true
// However, if there are any left as 'skipped', we should not tell
// the caller to throttle, since we still want some other
// peer to fetch those for us