aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-06-12 16:57:00 +0800
committerMartin Holst Swende <martin@swende.se>2019-06-12 17:18:49 +0800
commit3675b8545dfe41b9d095c126454f7653c1b4fa3e (patch)
tree4b485bec100dd7152648080f9b2d1cc6d3bc0715 /les
parent50e3795eef884ce8c5ae41ee31c7a4fa40196755 (diff)
downloadgo-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar.gz
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar.bz2
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar.lz
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar.xz
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.tar.zst
go-tangerine-3675b8545dfe41b9d095c126454f7653c1b4fa3e.zip
les/handler: avoid lookup missing state
Diffstat (limited to 'les')
-rw-r--r--les/handler.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/les/handler.go b/les/handler.go
index 32f1903d1..4e98e0b32 100644
--- a/les/handler.go
+++ b/les/handler.go
@@ -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()