From 7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 24 Dec 2014 11:29:58 +0100 Subject: [PATCH] Reset peer during download on disc --- peer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/peer.go b/peer.go index 13f0239d4..ceb49a5af 100644 --- a/peer.go +++ b/peer.go @@ -412,6 +412,12 @@ func (p *Peer) HandleInbound() { //} case wire.MsgDiscTy: + blockPool := p.ethereum.blockPool + if blockPool.peer == p { + blockPool.peer = nil + blockPool.td = ethutil.Big0 + } + p.Stop() peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint())) case wire.MsgPingTy: