Skip to content

Commit dae68e2

Browse files
core/types: make fetchers fetch withdrawals without transactions
1 parent c849633 commit dae68e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/types/block.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,12 @@ func (h *Header) SanityCheck() error {
152152
}
153153

154154
// EmptyBody returns true if there is no additional 'body' to complete the header
155-
// that is: no transactions and no uncles.
155+
// that is: no transactions, no uncles and no withdrawals.
156156
func (h *Header) EmptyBody() bool {
157-
return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash
157+
if h.WithdrawalsHash == nil {
158+
return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash
159+
}
160+
return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash && *h.WithdrawalsHash == EmptyRootHash
158161
}
159162

160163
// EmptyReceipts returns true if there are no receipts for this header/block.

0 commit comments

Comments
 (0)