From 457e04340109d955225ebda95c3ec988db041f3e Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Sat, 4 Jun 2022 09:21:33 +0700 Subject: [PATCH] skip empty senders (#4359) --- core/rawdb/accessors_chain.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 2d648af9d..2334678d5 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -885,7 +885,9 @@ func ReadReceipts(db kv.Tx, block *types.Block, senders []common.Address) types. if receipts == nil { return nil } - block.SendersToTxs(senders) + if len(senders) > 0 { + block.SendersToTxs(senders) + } if err := receipts.DeriveFields(block.Hash(), block.NumberU64(), block.Transactions(), senders); err != nil { log.Error("Failed to derive block receipts fields", "hash", block.Hash(), "number", block.NumberU64(), "err", err, "stack", dbg.Stack()) return nil