diff options
Diffstat (limited to 'block_pool.go')
-rw-r--r-- | block_pool.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block_pool.go b/block_pool.go index a1c3fc096..090871fd3 100644 --- a/block_pool.go +++ b/block_pool.go @@ -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) |