Skip to content

Commit

Permalink
les/handler: avoid lookup missing state
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Jun 12, 2019
1 parent 50e3795 commit 3675b85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions les/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,10 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
}
root = header.Root
}
// If a header lookup failed (non existent), ignore subsequent requests for the same header
if root == (common.Hash{}) {
continue
}
// Open the account or storage trie for the request
statedb := pm.blockchain.StateCache()

Expand Down

0 comments on commit 3675b85

Please sign in to comment.