diff --git a/turbo/stages/headerdownload/header_algos.go b/turbo/stages/headerdownload/header_algos.go index 40234bd20..a0852ac2e 100644 --- a/turbo/stages/headerdownload/header_algos.go +++ b/turbo/stages/headerdownload/header_algos.go @@ -697,7 +697,7 @@ func (hi *HeaderInserter) FeedHeader(db ethdb.StatelessRwTx, header *types.Heade } // Parent's total difficulty parentTd, err := rawdb.ReadTd(db, header.ParentHash, blockHeight-1) - if err != nil { + if err != nil || parentTd == nil { return fmt.Errorf("[%s] parent's total difficulty not found with hash %x and height %d for header %x %d: %v", hi.logPrefix, header.ParentHash, blockHeight-1, hash, blockHeight, err) } // Calculate total difficulty of this header using parent's total difficulty