Fix Fuzz Target For ExecutionPayload (#12541)

This commit is contained in:
Nishant Das
2023-06-16 20:41:28 +08:00
committed by GitHub
parent 63d81144e9
commit 0efb038984
2 changed files with 26 additions and 19 deletions

View File

@@ -394,6 +394,9 @@ func (e *ExecutionPayloadCapellaWithValue) UnmarshalJSON(enc []byte) error {
if err := json.Unmarshal(enc, &dec); err != nil {
return err
}
if dec.ExecutionPayload == nil {
return errors.New("missing required field 'executionPayload' for ExecutionPayloadWithValue")
}
if dec.ExecutionPayload.ParentHash == nil {
return errors.New("missing required field 'parentHash' for ExecutionPayload")