skip empty senders (#4359)

This commit is contained in:
Alex Sharov 2022-06-04 09:21:33 +07:00 committed by GitHub
parent 24af9bd1c6
commit 457e043401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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