diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-24 01:27:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-24 01:27:05 +0800 |
commit | c8e9ca048327d7074cfd58137ebf89e065763b71 (patch) | |
tree | 1765a19dd55a3cb1ef43ac6f8f957dcf1b6910de /blockpool | |
parent | 0330077d76b48934ab024a309000f83c78047d8a (diff) | |
download | dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.gz dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.bz2 dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.lz dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.xz dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.tar.zst dexon-c8e9ca048327d7074cfd58137ebf89e065763b71.zip |
fixed bad uncles
Diffstat (limited to 'blockpool')
-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]++ |