diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-24 18:29:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-24 18:29:58 +0800 |
commit | 7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1 (patch) | |
tree | e55eb2e0e63d3ded512f48e8ae41bf6d6cdaa39e | |
parent | 25d16f358ab5778ea04b23f60083b5a5325621c9 (diff) | |
download | go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar.gz go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar.bz2 go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar.lz go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar.xz go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.tar.zst go-tangerine-7ba9fe4d5d46d4a9373327d52d1c0e82d5933bc1.zip |
Reset peer during download on disc
-rw-r--r-- | peer.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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: |