File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 80
80
UnknownPayload = & EngineAPIError {code : - 38001 , msg : "Unknown payload" }
81
81
InvalidForkChoiceState = & EngineAPIError {code : - 38002 , msg : "Invalid forkchoice state" }
82
82
InvalidPayloadAttributes = & EngineAPIError {code : - 38003 , msg : "Invalid payload attributes" }
83
+ InvalidParams = & EngineAPIError {code : - 32602 , msg : "Invalid parameters" }
83
84
84
85
STATUS_INVALID = ForkChoiceResponse {PayloadStatus : PayloadStatusV1 {Status : INVALID }, PayloadID : nil }
85
86
STATUS_SYNCING = ForkChoiceResponse {PayloadStatus : PayloadStatusV1 {Status : SYNCING }, PayloadID : nil }
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ func NewConsensusAPI(eth *eth.Ethereum) *ConsensusAPI {
168
168
// and return its payloadID.
169
169
func (api * ConsensusAPI ) ForkchoiceUpdatedV1 (update beacon.ForkchoiceStateV1 , payloadAttributes * beacon.PayloadAttributes ) (beacon.ForkChoiceResponse , error ) {
170
170
if payloadAttributes != nil && payloadAttributes .Withdrawals != nil {
171
- return beacon .STATUS_INVALID , fmt .Errorf ("withdrawals not supported in V1" )
171
+ return beacon .STATUS_INVALID , beacon . InvalidParams . With ( fmt .Errorf ("withdrawals not supported in V1" ) )
172
172
}
173
173
return api .forkchoiceUpdated (update , payloadAttributes )
174
174
}
@@ -177,7 +177,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update beacon.ForkchoiceStateV1, pa
177
177
func (api * ConsensusAPI ) ForkchoiceUpdatedV2 (update beacon.ForkchoiceStateV1 , payloadAttributes * beacon.PayloadAttributes ) (beacon.ForkChoiceResponse , error ) {
178
178
if payloadAttributes != nil {
179
179
if err := api .verifyPayloadAttributes (payloadAttributes ); err != nil {
180
- return beacon .STATUS_INVALID , beacon .InvalidPayloadAttributes .With (err )
180
+ return beacon .STATUS_INVALID , beacon .InvalidParams .With (err )
181
181
}
182
182
}
183
183
return api .forkchoiceUpdated (update , payloadAttributes )
You can’t perform that action at this time.
0 commit comments