Skip to content

Commit

Permalink
eth/catalyst: engine API test add back require payloadID equality
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Jan 15, 2025
1 parent 1338fc3 commit f508330
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eth/catalyst/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,7 @@ func TestWithdrawals(t *testing.T) {
BeaconRoot: blockParams.BeaconRoot,
Version: engine.PayloadV2,
}).Id()
require.Equal(t, payloadID, *resp.PayloadID)
require.NoError(t, waitForApiPayloadToBuild(api, payloadID))
execData, err := api.GetPayloadV2(payloadID)
if err != nil {
Expand Down Expand Up @@ -1141,7 +1142,8 @@ func TestWithdrawals(t *testing.T) {
},
}
fcState.HeadBlockHash = execData.ExecutionPayload.BlockHash
_, err = api.ForkchoiceUpdatedV2(fcState, &blockParams)
// note: diff, need latest response to get payload ID comparison right.
resp, err = api.ForkchoiceUpdatedV2(fcState, &blockParams)
if err != nil {
t.Fatalf("error preparing payload, err=%v", err)
}
Expand All @@ -1156,6 +1158,7 @@ func TestWithdrawals(t *testing.T) {
BeaconRoot: blockParams.BeaconRoot,
Version: engine.PayloadV2,
}).Id()
require.Equal(t, payloadID, *resp.PayloadID)
require.NoError(t, waitForApiPayloadToBuild(api, payloadID))
execData, err = api.GetPayloadV2(payloadID)
if err != nil {
Expand Down Expand Up @@ -1676,6 +1679,7 @@ func TestParentBeaconBlockRoot(t *testing.T) {
BeaconRoot: blockParams.BeaconRoot,
Version: engine.PayloadV3,
}).Id()
require.Equal(t, payloadID, *resp.PayloadID)
require.NoError(t, waitForApiPayloadToBuild(api, *resp.PayloadID))
execData, err := api.GetPayloadV3(payloadID)
if err != nil {
Expand Down

0 comments on commit f508330

Please sign in to comment.