File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -169,8 +169,13 @@ func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {
169169// If there are payloadAttributes: we try to assemble a block with the payloadAttributes
170170// and return its payloadID.
171171func (api * ConsensusAPI ) ForkchoiceUpdatedV1 (update engine.ForkchoiceStateV1 , payloadAttributes * engine.PayloadAttributes ) (engine.ForkChoiceResponse , error ) {
172- if payloadAttributes != nil && payloadAttributes .Withdrawals != nil {
173- return engine .STATUS_INVALID , engine .InvalidParams .With (fmt .Errorf ("withdrawals not supported in V1" ))
172+ if payloadAttributes != nil {
173+ if payloadAttributes .Withdrawals != nil {
174+ return engine .STATUS_INVALID , engine .InvalidParams .With (fmt .Errorf ("withdrawals not supported in V1" ))
175+ }
176+ if api .eth .BlockChain ().Config ().IsShanghai (payloadAttributes .Timestamp ) {
177+ return engine .STATUS_INVALID , engine .InvalidParams .With (fmt .Errorf ("forkChoiceUpdateV1 called post-shanghai" ))
178+ }
174179 }
175180 return api .forkchoiceUpdated (update , payloadAttributes )
176181}
You can’t perform that action at this time.
0 commit comments