We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c849633 commit dae68e2Copy full SHA for dae68e2
core/types/block.go
@@ -152,9 +152,12 @@ func (h *Header) SanityCheck() error {
152
}
153
154
// EmptyBody returns true if there is no additional 'body' to complete the header
155
-// that is: no transactions and no uncles.
+// that is: no transactions, no uncles and no withdrawals.
156
func (h *Header) EmptyBody() bool {
157
- return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash
+ if h.WithdrawalsHash == nil {
158
+ return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash
159
+ }
160
+ return h.TxHash == EmptyRootHash && h.UncleHash == EmptyUncleHash && *h.WithdrawalsHash == EmptyRootHash
161
162
163
// EmptyReceipts returns true if there are no receipts for this header/block.
0 commit comments