Skip to content

Commit 93c541a

Browse files
tmelhaotmelhao
and
tmelhao
authored
eth/catalyst: fix wrong error message of payloadV2 after cancun (ethereum#29049)
* eth/catalyst: the same error format Signed-off-by: tmelhao <[email protected]> * eth/catalyst: wrong error message for payloadV2 post-cancun Signed-off-by: tmelhao <[email protected]> * eth/catalyst: parentBeaconBlockRoot -> parentBlockBeaconRoot Signed-off-by: tmelhao <[email protected]> * apply commit review Signed-off-by: tmelhao <[email protected]> --------- Signed-off-by: tmelhao <[email protected]> Co-authored-by: tmelhao <[email protected]>
1 parent b87b9b4 commit 93c541a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

eth/catalyst/api.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func (api *ConsensusAPI) NewPayloadV1(params engine.ExecutableData) (engine.Payl
488488
// NewPayloadV2 creates an Eth1 block, inserts it in the chain, and returns the status of the chain.
489489
func (api *ConsensusAPI) NewPayloadV2(params engine.ExecutableData) (engine.PayloadStatusV1, error) {
490490
if api.eth.BlockChain().Config().IsCancun(api.eth.BlockChain().Config().LondonBlock, params.Timestamp) {
491-
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("can't use new payload v2 post-shanghai"))
491+
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("can't use newPayloadV2 post-cancun"))
492492
}
493493
if api.eth.BlockChain().Config().LatestFork(params.Timestamp) == forks.Shanghai {
494494
if params.Withdrawals == nil {
@@ -503,7 +503,7 @@ func (api *ConsensusAPI) NewPayloadV2(params engine.ExecutableData) (engine.Payl
503503
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("non-nil excessBlobGas pre-cancun"))
504504
}
505505
if params.BlobGasUsed != nil {
506-
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("non-nil params.BlobGasUsed pre-cancun"))
506+
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("non-nil blobGasUsed pre-cancun"))
507507
}
508508
return api.newPayload(params, nil, nil)
509509
}
@@ -517,14 +517,14 @@ func (api *ConsensusAPI) NewPayloadV3(params engine.ExecutableData, versionedHas
517517
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil excessBlobGas post-cancun"))
518518
}
519519
if params.BlobGasUsed == nil {
520-
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil params.BlobGasUsed post-cancun"))
520+
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil blobGasUsed post-cancun"))
521521
}
522522

523523
if versionedHashes == nil {
524524
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil versionedHashes post-cancun"))
525525
}
526526
if beaconRoot == nil {
527-
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil parentBeaconBlockRoot post-cancun"))
527+
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(errors.New("nil beaconRoot post-cancun"))
528528
}
529529

530530
if api.eth.BlockChain().Config().LatestFork(params.Timestamp) != forks.Cancun {

0 commit comments

Comments
 (0)