This commit is contained in:
obscuren
2014-11-14 14:17:54 +01:00
parent 711be7009e
commit 56aa24002d
5 changed files with 20 additions and 21 deletions

View File

@ -323,7 +323,10 @@ out:
self.Reset()
poollogger.Debugf("Punishing peer for supplying bad chain (%v)\n", self.peer.conn.RemoteAddr())
if self.peer != nil && self.peer.conn != nil {
poollogger.Debugf("Punishing peer for supplying bad chain (%v)\n", self.peer.conn.RemoteAddr())
}
// This peer gave us bad hashes and made us fetch a bad chain, therefor he shall be punished.
self.eth.BlacklistPeer(self.peer)
self.peer.StopWithReason(DiscBadPeer)