Skip to content

Commit 7ba9fe4

Browse files
committed
Reset peer during download on disc
1 parent 25d16f3 commit 7ba9fe4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

peer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ func (p *Peer) HandleInbound() {
412412
//}
413413

414414
case wire.MsgDiscTy:
415+
blockPool := p.ethereum.blockPool
416+
if blockPool.peer == p {
417+
blockPool.peer = nil
418+
blockPool.td = ethutil.Big0
419+
}
420+
415421
p.Stop()
416422
peerlogger.Infoln("Disconnect peer: ", DiscReason(msg.Data.Get(0).Uint()))
417423
case wire.MsgPingTy:

0 commit comments

Comments
 (0)