From 39b1113a8a549da3b487cc59f1499cc19396f980 Mon Sep 17 00:00:00 2001 From: NC Date: Tue, 19 Mar 2024 17:07:38 +0800 Subject: [PATCH] Fix unit test --- packages/beacon-node/test/mocks/mockedBeaconChain.ts | 1 + packages/beacon-node/test/unit/chain/prepareNextSlot.test.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/beacon-node/test/mocks/mockedBeaconChain.ts b/packages/beacon-node/test/mocks/mockedBeaconChain.ts index c671dc0010fa..58093be936f4 100644 --- a/packages/beacon-node/test/mocks/mockedBeaconChain.ts +++ b/packages/beacon-node/test/mocks/mockedBeaconChain.ts @@ -138,6 +138,7 @@ vi.mock("../../src/chain/chain.js", async (importActual) => { produceBlindedBlock: vi.fn(), getCanonicalBlockAtSlot: vi.fn(), recomputeForkChoiceHead: vi.fn(), + predictProposerHead: vi.fn(), getHeadStateAtCurrentEpoch: vi.fn(), getHeadState: vi.fn(), updateBuilderStatus: vi.fn(), diff --git a/packages/beacon-node/test/unit/chain/prepareNextSlot.test.ts b/packages/beacon-node/test/unit/chain/prepareNextSlot.test.ts index 6d1be3fa8dd5..652749492240 100644 --- a/packages/beacon-node/test/unit/chain/prepareNextSlot.test.ts +++ b/packages/beacon-node/test/unit/chain/prepareNextSlot.test.ts @@ -120,6 +120,7 @@ describe("PrepareNextSlot scheduler", () => { chainStub.emitter.on(routes.events.EventType.payloadAttributes, spy); getForkStub.mockReturnValue(ForkName.bellatrix); chainStub.recomputeForkChoiceHead.mockReturnValue({...zeroProtoBlock, slot: SLOTS_PER_EPOCH - 3} as ProtoBlock); + chainStub.predictProposerHead.mockReturnValue({...zeroProtoBlock, slot: SLOTS_PER_EPOCH - 3} as ProtoBlock); forkChoiceStub.getJustifiedBlock.mockReturnValue({} as ProtoBlock); forkChoiceStub.getFinalizedBlock.mockReturnValue({} as ProtoBlock); updateBuilderStatus.mockReturnValue(void 0);