소스 검색

Merge pull request #19701 from holiman/fixles

les/handler: avoid lookup missing state
Péter Szilágyi 6 년 전
부모
커밋
32dafea1f0
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      les/handler.go

+ 4 - 0
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()