From 396f1dd87b91cc08a1db08aaa2b901a47b69d26f Mon Sep 17 00:00:00 2001 From: gary rong Date: Tue, 27 Aug 2019 21:29:00 +0800 Subject: [PATCH] les: fix panic (#20013) --- les/server_handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/les/server_handler.go b/les/server_handler.go index e34be4d3df..79c0a08a91 100644 --- a/les/server_handler.go +++ b/les/server_handler.go @@ -583,7 +583,6 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error { } // Look up the root hash belonging to the request var ( - number *uint64 header *types.Header trie state.Trie ) @@ -591,7 +590,7 @@ func (h *serverHandler) handleMsg(p *peer, wg *sync.WaitGroup) error { root, lastBHash = common.Hash{}, request.BHash 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) continue }