From ce08f205e8d346cd42ffd248b296fc0ef45f86ec Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Wed, 12 Jun 2019 18:53:35 +0800 Subject: [PATCH] les: add invalid counter for duplicate invalid req --- les/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/les/handler.go b/les/handler.go index 962cbc5937..c7bd231033 100644 --- a/les/handler.go +++ b/les/handler.go @@ -885,6 +885,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } // If a header lookup failed (non existent), ignore subsequent requests for the same header if root == (common.Hash{}) { + atomic.AddUint32(&p.invalidCount, 1) continue } // Open the account or storage trie for the request