put back checkTD and unskip incorrectTD test

pull/667/head
zelig 10 years ago
parent f546b486bf
commit cbd0b42060
  1. 8
      blockpool/blockpool.go
  2. 2
      blockpool/errors_test.go

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

@ -128,7 +128,7 @@ func TestErrInsufficientChainInfo(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()
_, blockPool, blockPoolTester := newTestBlockPool(t)

Loading…
Cancel
Save