File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,27 @@ type BuilderBlockValidationRequestV2 struct {
220220 WithdrawalsRoot common.Hash `json:"withdrawals_root"`
221221}
222222
223+ func (r * BuilderBlockValidationRequestV2 ) UnmarshalJSON (data []byte ) error {
224+ params := & struct {
225+ RegisteredGasLimit uint64 `json:"registered_gas_limit,string"`
226+ WithdrawalsRoot common.Hash `json:"withdrawals_root"`
227+ }{}
228+ err := json .Unmarshal (data , params )
229+ if err != nil {
230+ return err
231+ }
232+ r .RegisteredGasLimit = params .RegisteredGasLimit
233+ r .WithdrawalsRoot = params .WithdrawalsRoot
234+
235+ blockRequest := new (capellaapi.SubmitBlockRequest )
236+ err = json .Unmarshal (data , & blockRequest )
237+ if err != nil {
238+ return err
239+ }
240+ r .SubmitBlockRequest = * blockRequest
241+ return nil
242+ }
243+
223244func (api * BlockValidationAPI ) ValidateBuilderSubmissionV2 (params * BuilderBlockValidationRequestV2 ) error {
224245 // TODO: fuzztest, make sure the validation is sound
225246 // TODO: handle context!
You can’t perform that action at this time.
0 commit comments