From 24353b639102bbbd8b01bb83201f291a48a5bc1a Mon Sep 17 00:00:00 2001 From: NC Date: Thu, 28 Mar 2024 15:29:36 +0800 Subject: [PATCH] Fix type check --- packages/beacon-node/src/chain/forkChoice/index.ts | 2 +- packages/fork-choice/src/forkChoice/forkChoice.ts | 4 ++-- .../fork-choice/test/unit/forkChoice/getProposerHead.test.ts | 2 +- packages/state-transition/src/util/execution.ts | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/beacon-node/src/chain/forkChoice/index.ts b/packages/beacon-node/src/chain/forkChoice/index.ts index 047fc0d24977..411b9a267600 100644 --- a/packages/beacon-node/src/chain/forkChoice/index.ts +++ b/packages/beacon-node/src/chain/forkChoice/index.ts @@ -98,7 +98,7 @@ export function initializeForkChoice( }, currentSlot ), + opts, logger, - opts ); } diff --git a/packages/fork-choice/src/forkChoice/forkChoice.ts b/packages/fork-choice/src/forkChoice/forkChoice.ts index d71871e590a9..f53a26730c14 100644 --- a/packages/fork-choice/src/forkChoice/forkChoice.ts +++ b/packages/fork-choice/src/forkChoice/forkChoice.ts @@ -108,8 +108,8 @@ export class ForkChoice implements IForkChoice { private readonly fcStore: IForkChoiceStore, /** The underlying representation of the block DAG. */ private readonly protoArray: ProtoArray, - private readonly logger?: Logger, - private readonly opts?: ForkChoiceOpts + private readonly opts?: ForkChoiceOpts, + private readonly logger?: Logger ) { this.head = this.updateHead(); this.balances = this.fcStore.justified.balances; diff --git a/packages/fork-choice/test/unit/forkChoice/getProposerHead.test.ts b/packages/fork-choice/test/unit/forkChoice/getProposerHead.test.ts index 4d89f78b4cc2..9827e8875e7a 100644 --- a/packages/fork-choice/test/unit/forkChoice/getProposerHead.test.ts +++ b/packages/fork-choice/test/unit/forkChoice/getProposerHead.test.ts @@ -223,7 +223,7 @@ describe("Forkchoice / GetProposerHead", function () { currentSlot, }); - const forkChoice = new ForkChoice(config, fcStore, protoArr, undefined, { + const forkChoice = new ForkChoice(config, fcStore, protoArr, { proposerBoostEnabled: true, // proposerBoostReorgEnabled: true, }); diff --git a/packages/state-transition/src/util/execution.ts b/packages/state-transition/src/util/execution.ts index 30391e441586..7ac4da4aeecb 100644 --- a/packages/state-transition/src/util/execution.ts +++ b/packages/state-transition/src/util/execution.ts @@ -114,7 +114,6 @@ export function isExecutionPayload( payload: allForks.FullOrBlindedExecutionPayload ): payload is allForks.ExecutionPayload { return (payload as allForks.ExecutionPayload).transactions !== undefined; - } export function isCapellaPayload(