diff --git a/eth/fetcher/block_fetcher.go b/eth/fetcher/block_fetcher.go index 4cd6d5f37..26c58d714 100644 --- a/eth/fetcher/block_fetcher.go +++ b/eth/fetcher/block_fetcher.go @@ -639,6 +639,9 @@ func (f *BlockFetcher) loop() { log.Trace("Block empty, skipping body retrieval", "peer", announce.origin, "number", header.Number, "hash", header.Hash()) block := types.NewBlockWithHeader(header) + if block.Header().EmptyWithdrawalsHash() { + block = block.WithWithdrawals(make([]*types.Withdrawal, 0)) + } block.ReceivedAt = task.time complete = append(complete, block) diff --git a/eth/protocols/eth/handlers.go b/eth/protocols/eth/handlers.go index b028f5063..583dd2f67 100644 --- a/eth/protocols/eth/handlers.go +++ b/eth/protocols/eth/handlers.go @@ -366,7 +366,6 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error { for i, body := range res.BlockBodiesResponse { txsHashes[i] = types.DeriveSha(types.Transactions(body.Transactions), hasher) uncleHashes[i] = types.CalcUncleHash(body.Uncles) - // Withdrawals may be not nil, but a empty value when Sidecars not empty if body.Withdrawals != nil { withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher) }