aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eth/downloader/downloader.go1
-rw-r--r--eth/downloader/peer.go3
2 files changed, 4 insertions, 0 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index d8dbef726..626f47b7b 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -460,6 +460,7 @@ out:
// 3) Amount and availability.
if peer := d.peers.Peer(pid); peer != nil {
peer.Demote()
+ glog.V(logger.Detail).Infof("%s: block delivery timeout", peer)
}
}
// After removing bad peers make sure we actually have sufficient peer left to keep downloading
diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go
index 43b50079b..5fbc64648 100644
--- a/eth/downloader/peer.go
+++ b/eth/downloader/peer.go
@@ -87,6 +87,9 @@ func (p *peer) SetIdle() {
scale := 2.0
if time.Since(p.started) > blockSoftTTL {
scale = 0.5
+ if time.Since(p.started) > blockHardTTL {
+ scale = 1 / float64(MaxBlockFetch) // reduces capacity to 1
+ }
}
for {
// Calculate the new download bandwidth allowance