From 16b3427c153a8d3758519b309a08fdd274d65604 Mon Sep 17 00:00:00 2001 From: harkamal Date: Tue, 10 Oct 2023 17:33:16 +0530 Subject: [PATCH] fixes --- packages/beacon-node/src/api/impl/validator/index.ts | 2 +- .../test/unit/api/impl/validator/produceBlockV3.test.ts | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/beacon-node/src/api/impl/validator/index.ts b/packages/beacon-node/src/api/impl/validator/index.ts index d1bf4f1ebda4..dba26d847593 100644 --- a/packages/beacon-node/src/api/impl/validator/index.ts +++ b/packages/beacon-node/src/api/impl/validator/index.ts @@ -410,7 +410,7 @@ export function getValidatorApi({ // set some sensible opts builderSelection = builderSelection ?? routes.validator.BuilderSelection.MaxProfit; const isBuilderEnabled = - ForkSeq[fork] < ForkSeq.bellatrix && + ForkSeq[fork] >= ForkSeq.bellatrix && chain.executionBuilder !== undefined && builderSelection !== routes.validator.BuilderSelection.ExecutionOnly; diff --git a/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts b/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts index cf7a9c097448..9cd3779e504f 100644 --- a/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts +++ b/packages/beacon-node/test/unit/api/impl/validator/produceBlockV3.test.ts @@ -50,16 +50,7 @@ describe("api/validator - produceBlockV3", function () { const config = createBeaconConfig(chainConfig, genesisValidatorsRoot); beforeEach(() => { - const chainConfig = createChainForkConfig({ - ...defaultChainConfig, - ALTAIR_FORK_EPOCH: 0, - BELLATRIX_FORK_EPOCH: 1, - }); - const genesisValidatorsRoot = Buffer.alloc(32, 0xaa); - const config = createBeaconConfig(chainConfig, genesisValidatorsRoot); - chainStub = sandbox.createStubInstance(BeaconChain) as StubbedChain; - dbStub = new StubbedBeaconDb(config); networkStub = sinon.createStubInstance(Network); syncStub = sinon.createStubInstance(BeaconSync);