aboutsummaryrefslogtreecommitdiffstats
path: root/block_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-14 21:17:54 +0800
committerobscuren <geffobscura@gmail.com>2014-11-14 21:17:54 +0800
commit56aa24002de357c24a9644a49d5702c8d4663909 (patch)
tree7791c7cbe4e66137cf85a405cf32751a7916ce70 /block_pool.go
parent711be7009ef5b9ad77f37a4ccd0dffcc9286e1f8 (diff)
downloadgo-tangerine-56aa24002de357c24a9644a49d5702c8d4663909.tar.gz
go-tangerine-56aa24002de357c24a9644a49d5702c8d4663909.tar.zst
go-tangerine-56aa24002de357c24a9644a49d5702c8d4663909.zip
Clean up
Diffstat (limited to 'block_pool.go')
-rw-r--r--block_pool.go5
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)