From bcea950238430b86f77fb2965ccb5ad36a80e832 Mon Sep 17 00:00:00 2001 From: lightclient Date: Mon, 22 Apr 2024 14:39:23 -0600 Subject: [PATCH] core/types: add empty withdrawls to body if len == 0 --- core/types/block.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/types/block.go b/core/types/block.go index efc427b209..4857cd6e50 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -260,6 +260,7 @@ func NewBlock(header *Header, body *Body, receipts []*Receipt, hasher TrieHasher b.header.WithdrawalsHash = nil } else if len(withdrawals) == 0 { b.header.WithdrawalsHash = &EmptyWithdrawalsHash + b.withdrawals = Withdrawals{} } else { hash := DeriveSha(Withdrawals(withdrawals), hasher) b.header.WithdrawalsHash = &hash