aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-19 05:56:08 +0800
committerobscuren <geffobscura@gmail.com>2015-04-19 05:56:08 +0800
commit50e096e627c8c07b4dda3a7221dda5f32dc5c5cb (patch)
treedd4d24e45e14ce075db255849a35e82259f43ba8 /eth/downloader
parent03b4cf74a2d2ce2f1ff39f0354b9577425e6524e (diff)
downloaddexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.gz
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.bz2
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.lz
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.xz
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.tar.zst
dexon-50e096e627c8c07b4dda3a7221dda5f32dc5c5cb.zip
downloader: don't remove peers. keep them around
Diffstat (limited to 'eth/downloader')
-rw-r--r--eth/downloader/downloader.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 2f98a1414..8f955b483 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -176,6 +176,7 @@ out:
var peer *peer = sync.peer
err := d.getFromPeer(peer, sync.hash, sync.ignoreInitial)
if err != nil {
+ glog.V(logger.Detail).Infoln(err)
break
}
@@ -301,7 +302,7 @@ out:
d.queue.reset()
d.peers.reset()
- return errPeersUnavailable
+ return fmt.Errorf("%v avaialable = %d. total = %d", errPeersUnavailable, len(availablePeers), len(d.peers))
}
} else if len(d.queue.fetching) == 0 {
@@ -321,7 +322,7 @@ out:
if time.Since(chunk.itime) > blockTtl {
badPeers = append(badPeers, pid)
// remove peer as good peer from peer list
- d.UnregisterPeer(pid)
+ //d.UnregisterPeer(pid)
}
}
d.queue.mu.Unlock()