Skip to content

Commit

Permalink
fix: Withdrawals turn into empty from nil when BlockBody has Sidecars (
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 committed Mar 21, 2024
1 parent dd6550d commit cb56d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error {
if hash := types.DeriveSha(block.Withdrawals(), trie.NewStackTrie(nil)); hash != *header.WithdrawalsHash {
return fmt.Errorf("withdrawals root hash mismatch (header value %x, calculated %x)", *header.WithdrawalsHash, hash)
}
} else if block.Withdrawals() != nil {
} else if len(block.Withdrawals()) != 0 { // Withdrawals turn into empty from nil when BlockBody has Sidecars
// Withdrawals are not allowed prior to shanghai fork
return errors.New("withdrawals present in block body")
}
Expand Down

0 comments on commit cb56d54

Please sign in to comment.