@@ -166,10 +166,10 @@ func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {
166
166
func (api * ConsensusAPI ) ForkchoiceUpdatedV1 (update engine.ForkchoiceStateV1 , payloadAttributes * engine.PayloadAttributes ) (engine.ForkChoiceResponse , error ) {
167
167
if payloadAttributes != nil {
168
168
if payloadAttributes .Withdrawals != nil {
169
- return engine .STATUS_INVALID , engine .InvalidParams .With (fmt . Errorf ("withdrawals not supported in V1" ))
169
+ return engine .STATUS_INVALID , engine .InvalidParams .With (errors . New ("withdrawals not supported in V1" ))
170
170
}
171
171
if api .eth .BlockChain ().Config ().IsShanghai (api .eth .BlockChain ().Config ().LondonBlock , payloadAttributes .Timestamp ) {
172
- return engine .STATUS_INVALID , engine .InvalidParams .With (fmt . Errorf ("forkChoiceUpdateV1 called post-shanghai" ))
172
+ return engine .STATUS_INVALID , engine .InvalidParams .With (errors . New ("forkChoiceUpdateV1 called post-shanghai" ))
173
173
}
174
174
}
175
175
return api .forkchoiceUpdated (update , payloadAttributes )
@@ -386,7 +386,7 @@ func (api *ConsensusAPI) ExchangeTransitionConfigurationV1(config engine.Transit
386
386
TerminalBlockNumber : config .TerminalBlockNumber ,
387
387
}, nil
388
388
}
389
- return nil , fmt . Errorf ("invalid terminal block hash" )
389
+ return nil , errors . New ("invalid terminal block hash" )
390
390
}
391
391
return & engine.TransitionConfigurationV1 {TerminalTotalDifficulty : (* hexutil .Big )(ttd )}, nil
392
392
}
@@ -417,7 +417,7 @@ func (api *ConsensusAPI) getPayload(payloadID engine.PayloadID) (*engine.Executi
417
417
// NewPayloadV1 creates an Eth1 block, inserts it in the chain, and returns the status of the chain.
418
418
func (api * ConsensusAPI ) NewPayloadV1 (params engine.ExecutableData ) (engine.PayloadStatusV1 , error ) {
419
419
if params .Withdrawals != nil {
420
- return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (fmt . Errorf ("withdrawals not supported in V1" ))
420
+ return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (errors . New ("withdrawals not supported in V1" ))
421
421
}
422
422
return api .newPayload (params )
423
423
}
@@ -426,10 +426,10 @@ func (api *ConsensusAPI) NewPayloadV1(params engine.ExecutableData) (engine.Payl
426
426
func (api * ConsensusAPI ) NewPayloadV2 (params engine.ExecutableData ) (engine.PayloadStatusV1 , error ) {
427
427
if api .eth .BlockChain ().Config ().IsShanghai (new (big.Int ).SetUint64 (params .Number ), params .Timestamp ) {
428
428
if params .Withdrawals == nil {
429
- return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (fmt . Errorf ("nil withdrawals post-shanghai" ))
429
+ return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (errors . New ("nil withdrawals post-shanghai" ))
430
430
}
431
431
} else if params .Withdrawals != nil {
432
- return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (fmt . Errorf ("non-nil withdrawals pre-shanghai" ))
432
+ return engine.PayloadStatusV1 {Status : engine .INVALID }, engine .InvalidParams .With (errors . New ("non-nil withdrawals pre-shanghai" ))
433
433
}
434
434
return api .newPayload (params )
435
435
}
0 commit comments