fix: ensure empty withdrawals after cancun before broadcast (#2525)
This commit is contained in:
parent
27a3ec5d72
commit
f2e7f1dd24
@ -731,9 +731,6 @@ func (f *BlockFetcher) loop() {
|
||||
matched = true
|
||||
if f.getBlock(hash) == nil {
|
||||
block := types.NewBlockWithHeader(announce.header).WithBody(task.transactions[i], task.uncles[i])
|
||||
if block.Header().EmptyWithdrawalsHash() {
|
||||
block = block.WithWithdrawals(make([]*types.Withdrawal, 0))
|
||||
}
|
||||
block = block.WithSidecars(task.sidecars[i])
|
||||
block.ReceivedAt = task.time
|
||||
blocks = append(blocks, block)
|
||||
@ -919,6 +916,10 @@ func (f *BlockFetcher) importBlocks(op *blockOrHeaderInject) {
|
||||
return
|
||||
}
|
||||
|
||||
if block.Header().EmptyWithdrawalsHash() {
|
||||
block = block.WithWithdrawals(make([]*types.Withdrawal, 0))
|
||||
}
|
||||
|
||||
defer func() { f.done <- hash }()
|
||||
// Quickly validate the header and propagate the block if it passes
|
||||
switch err := f.verifyHeader(block.Header()); err {
|
||||
|
Loading…
Reference in New Issue
Block a user