From cbd0b42060d537d4d899b593be1ecd5ffdbd301a Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 8 Apr 2015 03:50:34 +0100 Subject: [PATCH] put back checkTD and unskip incorrectTD test --- blockpool/blockpool.go | 8 ++++---- blockpool/errors_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go index f9c8a64abb..d823d9898f 100644 --- a/blockpool/blockpool.go +++ b/blockpool/blockpool.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() } } } diff --git a/blockpool/errors_test.go b/blockpool/errors_test.go index e9aef4c877..645aca4ee5 100644 --- a/blockpool/errors_test.go +++ b/blockpool/errors_test.go @@ -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)