Skip to content

Commit 0ac4a84

Browse files
authored
beacon/engine: omit empty witness in payload response (#31739)
Fixes #31737
1 parent a511553 commit 0ac4a84

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

beacon/engine/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type executionPayloadEnvelopeMarshaling struct {
131131

132132
type PayloadStatusV1 struct {
133133
Status string `json:"status"`
134-
Witness *hexutil.Bytes `json:"witness"`
134+
Witness *hexutil.Bytes `json:"witness,omitempty"`
135135
LatestValidHash *common.Hash `json:"latestValidHash"`
136136
ValidationError *string `json:"validationError"`
137137
}

eth/catalyst/api.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,11 @@ func (api *ConsensusAPI) forkchoiceUpdated(update engine.ForkchoiceStateV1, payl
373373
}
374374
valid := func(id *engine.PayloadID) engine.ForkChoiceResponse {
375375
return engine.ForkChoiceResponse{
376-
PayloadStatus: engine.PayloadStatusV1{Status: engine.VALID, LatestValidHash: &update.HeadBlockHash},
377-
PayloadID: id,
376+
PayloadStatus: engine.PayloadStatusV1{
377+
Status: engine.VALID,
378+
LatestValidHash: &update.HeadBlockHash,
379+
},
380+
PayloadID: id,
378381
}
379382
}
380383
if rawdb.ReadCanonicalHash(api.eth.ChainDb(), block.NumberU64()) != update.HeadBlockHash {

0 commit comments

Comments
 (0)