eth/downloader: match capabilities when querying idle peers

This commit is contained in:
Péter Szilágyi
2015-10-02 13:20:41 +03:00
parent 49ae538506
commit 47f62a67aa
3 changed files with 53 additions and 8 deletions

View File

@ -816,7 +816,7 @@ func (d *Downloader) fetchBlocks61(from uint64) error {
}
// Send a download request to all idle peers, until throttled
throttled := false
for _, peer := range d.peers.IdlePeers() {
for _, peer := range d.peers.IdlePeers(eth61) {
// Short circuit if throttling activated
if d.queue.Throttle() {
throttled = true
@ -1255,7 +1255,7 @@ func (d *Downloader) fetchBodies(from uint64) error {
}
// Send a download request to all idle peers, until throttled
queuedEmptyBlocks, throttled := false, false
for _, peer := range d.peers.IdlePeers() {
for _, peer := range d.peers.IdlePeers(eth62) {
// Short circuit if throttling activated
if d.queue.Throttle() {
throttled = true