les: add invalid counter for duplicate invalid req

This commit is contained in:
rjl493456442 2019-06-12 18:53:35 +08:00
parent 2b349f474a
commit ce08f205e8

View file

@ -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 a header lookup failed (non existent), ignore subsequent requests for the same header
if root == (common.Hash{}) { if root == (common.Hash{}) {
atomic.AddUint32(&p.invalidCount, 1)
continue continue
} }
// Open the account or storage trie for the request // Open the account or storage trie for the request