aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-24 01:27:05 +0800
committerobscuren <geffobscura@gmail.com>2015-03-24 01:27:05 +0800
commitc8e9ca048327d7074cfd58137ebf89e065763b71 (patch)
tree1765a19dd55a3cb1ef43ac6f8f957dcf1b6910de /blockpool
parent0330077d76b48934ab024a309000f83c78047d8a (diff)
downloadgo-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.gz
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.bz2
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.lz
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.xz
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.zst
go-tangerine-c8e9ca048327d7074cfd58137ebf89e065763b71.zip
fixed bad uncles
Diffstat (limited to 'blockpool')
-rw-r--r--blockpool/peers.go3
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]++