core: remove withdrawal length check for state processor (#30286)

The withdrawal length is already verified by the beacon consensus package, so the check in the state processor is a duplicate.
pull/30317/head^2
Shude Li 1 month ago committed by GitHub
parent 43640f12d8
commit 09d889d2e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      core/state_processor.go

@ -17,7 +17,6 @@
package core package core
import ( import (
"errors"
"fmt" "fmt"
"math/big" "math/big"
@ -93,11 +92,6 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
receipts = append(receipts, receipt) receipts = append(receipts, receipt)
allLogs = append(allLogs, receipt.Logs...) 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) // Finalize the block, applying any consensus engine specific extras (e.g. block rewards)
p.chain.engine.Finalize(p.chain, header, statedb, block.Body()) p.chain.engine.Finalize(p.chain, header, statedb, block.Body())

Loading…
Cancel
Save