core/types: ensure that block bodies are always downloaded (they will contain BALs even if they are otherwise empty). This is a temporary hack to ensure we can sync bal devnet 1

This commit is contained in:
Jared Wasinger 2026-01-06 14:45:48 +09:00
parent a3f9b3dc26
commit 8e028f3757

View file

@ -172,10 +172,8 @@ func (h *Header) SanityCheck() error {
// EmptyBody returns true if there is no additional 'body' to complete the header // EmptyBody returns true if there is no additional 'body' to complete the header
// that is: no transactions, no uncles and no withdrawals. // that is: no transactions, no uncles and no withdrawals.
func (h *Header) EmptyBody() bool { func (h *Header) EmptyBody() bool {
var ( // quick hack to ensure that we download bodies for empty blocks so that we receive the BALs
emptyWithdrawals = h.WithdrawalsHash == nil || *h.WithdrawalsHash == EmptyWithdrawalsHash return false
)
return h.TxHash == EmptyTxsHash && h.UncleHash == EmptyUncleHash && emptyWithdrawals
} }
// EmptyReceipts returns true if there are no receipts for this header/block. // EmptyReceipts returns true if there are no receipts for this header/block.