From 94e4aa6ea9aabb5bf6244d9b38607b336703af98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 5 Jun 2015 11:53:46 +0300 Subject: eth/downloader: log hard timeouts and reset capacity --- eth/downloader/peer.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'eth/downloader/peer.go') 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 -- cgit v1.2.3