Skip to content

Commit

Permalink
core: remove withdrawal length check for state processor (#30286)
Browse files Browse the repository at this point in the history
The withdrawal length is already verified by the beacon consensus package, so the check in the state processor is a duplicate.
  • Loading branch information
islishude committed Aug 16, 2024
1 parent 43640f1 commit 09d889d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package core

import (
"errors"
"fmt"
"math/big"

Expand Down Expand Up @@ -93,11 +92,6 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
receipts = append(receipts, receipt)
allLogs = append(allLogs, receipt.Logs...)
}
// Fail if Shanghai not enabled and len(withdrawals) is non-zero.
withdrawals := block.Withdrawals()
if len(withdrawals) > 0 && !p.config.IsShanghai(block.Number(), block.Time()) {
return nil, nil, 0, errors.New("withdrawals before shanghai")
}
// Finalize the block, applying any consensus engine specific extras (e.g. block rewards)
p.chain.engine.Finalize(p.chain, header, statedb, block.Body())

Expand Down

0 comments on commit 09d889d

Please sign in to comment.