Skip to content

Commit

Permalink
Merge pull request #2 from alexgao001/fix-bypass-withdrawals-root
Browse files Browse the repository at this point in the history
fix: withdrawal root and withdrawals list
  • Loading branch information
unclezoro authored Aug 1, 2024
2 parents f41e0e5 + dc740bd commit 21a070b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/blockarchiver/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ func convertBlock(block *Block) (*GeneralBlock, error) {
txs = append(txs, transaction)
}
}
newBlock := types.NewBlockWithHeader(header).WithBody(txs, nil)
newBlock := types.NewBlockWithHeader(header).WithBody(txs, make([]*types.Header, 0))
if header.WithdrawalsHash != nil && *header.WithdrawalsHash == types.EmptyWithdrawalsHash {
newBlock = newBlock.WithWithdrawals(make([]*types.Withdrawal, 0))
}
return &GeneralBlock{
Block: newBlock,
TotalDifficulty: totalDifficulty,
Expand Down

0 comments on commit 21a070b

Please sign in to comment.