diff options
Diffstat (limited to 'blockpool/peers.go')
-rw-r--r-- | blockpool/peers.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/blockpool/peers.go b/blockpool/peers.go index 6bff38e87..1e56f315d 100644 --- a/blockpool/peers.go +++ b/blockpool/peers.go @@ -471,7 +471,8 @@ func (self *peer) getBlockHashes() bool { self.addError(ErrInvalidBlock, "%v", err) self.bp.status.badPeers[self.id]++ } else { - if self.currentBlock.Td != nil { + // XXX added currentBlock check (?) + if self.currentBlock != nil && self.currentBlock.Td != nil { if self.td.Cmp(self.currentBlock.Td) != 0 { self.addError(ErrIncorrectTD, "on block %x", self.currentBlockHash) self.bp.status.badPeers[self.id]++ |