diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-14 21:17:54 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-14 21:17:54 +0800 |
commit | 56aa24002de357c24a9644a49d5702c8d4663909 (patch) | |
tree | 7791c7cbe4e66137cf85a405cf32751a7916ce70 /block_pool.go | |
parent | 711be7009ef5b9ad77f37a4ccd0dffcc9286e1f8 (diff) | |
download | dexon-56aa24002de357c24a9644a49d5702c8d4663909.tar.gz dexon-56aa24002de357c24a9644a49d5702c8d4663909.tar.zst dexon-56aa24002de357c24a9644a49d5702c8d4663909.zip |
Clean up
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) |