aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/blockpool.go
diff options
context:
space:
mode:
Diffstat (limited to 'blockpool/blockpool.go')
-rw-r--r--blockpool/blockpool.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go
index 09b9e7b0b..1ca97e0ca 100644
--- a/blockpool/blockpool.go
+++ b/blockpool/blockpool.go
@@ -757,6 +757,9 @@ func (self *BlockPool) checkTD(nodes ...*node) {
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()
}
}
}