aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-04-08 10:50:34 +0800
committerzelig <viktor.tron@gmail.com>2015-04-09 20:58:35 +0800
commitcbd0b42060d537d4d899b593be1ecd5ffdbd301a (patch)
tree0b46c755020b7ef74fd6fb42567f98878953484c /blockpool
parentf546b486bf444d9601cf97b934b2974a9b4d58f8 (diff)
downloadgo-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar.gz
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar.bz2
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar.lz
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar.xz
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.tar.zst
go-tangerine-cbd0b42060d537d4d899b593be1ecd5ffdbd301a.zip
put back checkTD and unskip incorrectTD test
Diffstat (limited to 'blockpool')
-rw-r--r--blockpool/blockpool.go8
-rw-r--r--blockpool/errors_test.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go
index f9c8a64ab..d823d9898 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 e9aef4c87..645aca4ee 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)