Commit 396f1dd8 authored by gary rong's avatar gary rong Committed by Martin Holst Swende

les: fix panic (#20013)

parent 68502595
...@@ -583,7 +583,6 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error { ...@@ -583,7 +583,6 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error {
} }
// Look up the root hash belonging to the request // Look up the root hash belonging to the request
var ( var (
number *uint64
header *types.Header header *types.Header
trie state.Trie trie state.Trie
) )
...@@ -591,7 +590,7 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error { ...@@ -591,7 +590,7 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error {
root, lastBHash = common.Hash{}, request.BHash root, lastBHash = common.Hash{}, request.BHash
if header = h.blockchain.GetHeaderByHash(request.BHash); header == nil { if header = h.blockchain.GetHeaderByHash(request.BHash); header == nil {
p.Log().Warn("Failed to retrieve header for proof", "block", *number, "hash", request.BHash) p.Log().Warn("Failed to retrieve header for proof", "hash", request.BHash)
atomic.AddUint32(&p.invalidCount, 1) atomic.AddUint32(&p.invalidCount, 1)
continue continue
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment