put back checkTD and unskip incorrectTD test

This commit is contained in:
zelig 2015-04-08 03:50:34 +01:00
parent f546b486bf
commit cbd0b42060
2 changed files with 5 additions and 5 deletions

@ -785,10 +785,10 @@ func (self *BlockPool) checkTD(nodes ...*node) {
if n.td != nil { if n.td != nil {
plog.DebugDetailf("peer td %v =?= block td %v", n.td, n.block.Td) plog.DebugDetailf("peer td %v =?= block td %v", n.td, n.block.Td)
if n.td.Cmp(n.block.Td) != 0 { if n.td.Cmp(n.block.Td) != 0 {
//self.peers.peerError(n.blockBy, ErrIncorrectTD, "on block %x", n.hash) self.peers.peerError(n.blockBy, ErrIncorrectTD, "on block %x", n.hash)
//self.status.lock.Lock() self.status.lock.Lock()
//self.status.badPeers[n.blockBy]++ self.status.badPeers[n.blockBy]++
//self.status.lock.Unlock() self.status.lock.Unlock()
} }
} }
} }

@ -128,7 +128,7 @@ func TestErrInsufficientChainInfo(t *testing.T) {
} }
func TestIncorrectTD(t *testing.T) { func TestIncorrectTD(t *testing.T) {
t.Skip() // @zelig this one requires fixing for the TD // t.Skip() // @zelig this one requires fixing for the TD
test.LogInit() test.LogInit()
_, blockPool, blockPoolTester := newTestBlockPool(t) _, blockPool, blockPoolTester := newTestBlockPool(t)