From 7c59af10444f4df758a69c99fe62d883396cbb44 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Wed, 30 Apr 2025 11:19:58 +0800 Subject: [PATCH] core/filtermaps: polish --- core/filtermaps/chain_view.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/filtermaps/chain_view.go b/core/filtermaps/chain_view.go index 2cc87670a7..63df2cfb6d 100644 --- a/core/filtermaps/chain_view.go +++ b/core/filtermaps/chain_view.go @@ -103,6 +103,7 @@ func (cv *ChainView) Receipts(number uint64) types.Receipts { blockHash := cv.BlockHash(number) if blockHash == (common.Hash{}) { log.Error("Chain view: block hash unavailable", "number", number, "head", cv.headNumber) + return nil } return cv.chain.GetReceiptsByHash(blockHash) } @@ -114,6 +115,7 @@ func (cv *ChainView) RawReceipts(number uint64) types.Receipts { blockHash := cv.BlockHash(number) if blockHash == (common.Hash{}) { log.Error("Chain view: block hash unavailable", "number", number, "head", cv.headNumber) + return nil } return cv.chain.GetRawReceiptsByHash(blockHash) }