uncomment future block TD check, add test for skipping TD check on future block

This commit is contained in:
zelig
2015-04-08 21:14:49 +01:00
parent e55747a074
commit 0e2bc23148
4 changed files with 46 additions and 9 deletions

View File

@@ -473,8 +473,8 @@ func (self *peer) getBlockHashes() bool {
// XXX added currentBlock check (?)
if self.currentBlock != nil && self.currentBlock.Td != nil && !self.currentBlock.Queued() {
if self.td.Cmp(self.currentBlock.Td) != 0 {
// self.addError(ErrIncorrectTD, "on block %x", self.currentBlockHash)
// self.bp.status.badPeers[self.id]++
self.addError(ErrIncorrectTD, "on block %x", self.currentBlockHash)
self.bp.status.badPeers[self.id]++
}
}
headKey := self.parentHash