Skip to content

Commit 1132ea4

Browse files
eth/catalyst: return null if no payload created
1 parent 6561c6d commit 1132ea4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

eth/catalyst/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(heads ForkchoiceStateV1, PayloadAtt
216216
api.preparedBlocks[id] = data
217217
log.Info("Created payload", "payloadid", id)
218218
// TODO (MariusVanDerWijden) do something with the payloadID?
219-
return ForkChoiceResponse{Status: SUCCESS.Status, PayloadID: hash}, nil
219+
hex := hexutil.Bytes(hash)
220+
return ForkChoiceResponse{Status: SUCCESS.Status, PayloadID: &hex}, nil
220221
}
221222
}
222223
return ForkChoiceResponse{Status: SUCCESS.Status, PayloadID: nil}, nil

eth/catalyst/api_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ type ConsensusValidatedParams struct {
103103
}
104104

105105
type ForkChoiceResponse struct {
106-
Status string `json:"status"`
107-
PayloadID hexutil.Bytes `json:"payloadId"`
106+
Status string `json:"status"`
107+
PayloadID *hexutil.Bytes `json:"payloadId"`
108108
}
109109

110110
type ForkchoiceStateV1 struct {

miner/stress/beacon/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (n *ethNode) assembleBlock(parentHash common.Hash, parentTimestamp uint64)
153153
if err != nil {
154154
return nil, err
155155
}
156-
return n.api.GetPayloadV1(payload.PayloadID)
156+
return n.api.GetPayloadV1(*payload.PayloadID)
157157
}
158158

159159
func (n *ethNode) insertBlock(eb catalyst.ExecutableDataV1) error {

0 commit comments

Comments
 (0)