From 976bea43c6f2309c43e92620f1cebef732f0b905 Mon Sep 17 00:00:00 2001 From: Alan Orwick Date: Thu, 21 Jul 2022 16:46:40 -0500 Subject: [PATCH] downloader.go: catch nil header --- eth/downloader/queue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/downloader/queue.go b/eth/downloader/queue.go index 60f9437f3a..2f12a690b6 100644 --- a/eth/downloader/queue.go +++ b/eth/downloader/queue.go @@ -337,6 +337,10 @@ func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header { for _, header := range headers { // Make sure chain order is honoured and preserved throughout hash := header.Hash() + if header == nil { + log.Warn("Header nil", "expected", from) + break + } if header.Number == nil || header.Number[types.QuaiNetworkContext].Uint64() != from { log.Warn("Header broke chain ordering", "number", header.Number, "hash", hash, "expected", from) break