@@ -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.
489489func (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 {
@@ -879,8 +879,7 @@ func getBody(block *types.Block) *engine.ExecutionPayloadBodyV1 {
879879 )
880880
881881 for j , tx := range body .Transactions {
882- data , _ := tx .MarshalBinary ()
883- txs [j ] = hexutil .Bytes (data )
882+ txs [j ], _ = tx .MarshalBinary ()
884883 }
885884
886885 // Post-shanghai withdrawals MUST be set to empty slice instead of nil
0 commit comments