mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
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:
parent
a3f9b3dc26
commit
8e028f3757
1 changed files with 2 additions and 4 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue