Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jan 8, 2024
1 parent 0c13db6 commit 86c60b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ describe("api/validator - produceBlockV2", function () {
const feeRecipient = "0xcccccccccccccccccccccccccccccccccccccccc";

const api = getValidatorApi(modules);
server.chainStub.produceBlock.mockResolvedValue({block: fullBlock, executionPayloadValue, consensusBlockValue});
server.chainStub.produceBlock.mockResolvedValue({
block: fullBlock,
executionPayloadValue,
consensusBlockValue,
shouldOverrideBuilder: false,
});

// check if expectedFeeRecipient is passed to produceBlock
await api.produceBlockV2(slot, randaoReveal, graffiti, {feeRecipient});
Expand Down Expand Up @@ -129,6 +134,7 @@ describe("api/validator - produceBlockV2", function () {
executionEngineStub.getPayload.mockResolvedValue({
executionPayload: ssz.bellatrix.ExecutionPayload.defaultValue(),
executionPayloadValue,
shouldOverrideBuilder: false,
});

// use fee recipient passed in produceBlockBody call for payload gen in engine notifyForkchoiceUpdate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ describe("api/validator - produceBlockV3", function () {
block: fullBlock,
executionPayloadValue: BigInt(enginePayloadValue),
consensusBlockValue: BigInt(consensusBlockValue),
shouldOverrideBuilder: false,
});
} else {
chainStub.produceBlock.mockRejectedValue(Error("not produced"));
Expand All @@ -99,6 +100,7 @@ describe("api/validator - produceBlockV3", function () {
block: blindedBlock,
executionPayloadValue: BigInt(builderPayloadValue),
consensusBlockValue: BigInt(consensusBlockValue),
shouldOverrideBuilder: false,
});
} else {
chainStub.produceBlindedBlock.mockRejectedValue(Error("not produced"));
Expand Down

0 comments on commit 86c60b8

Please sign in to comment.