From 0119cd927f087a53178a3acba8ebbc1ca4848ec0 Mon Sep 17 00:00:00 2001 From: harkamal Date: Mon, 8 Jan 2024 17:08:04 +0530 Subject: [PATCH] fixes for spec complaince --- packages/beacon-node/src/api/impl/validator/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/beacon-node/src/api/impl/validator/index.ts b/packages/beacon-node/src/api/impl/validator/index.ts index 2479fda5ea62..e8f736e0b3c5 100644 --- a/packages/beacon-node/src/api/impl/validator/index.ts +++ b/packages/beacon-node/src/api/impl/validator/index.ts @@ -447,14 +447,13 @@ export function getValidatorApi({ builderSelection = builderSelection ?? routes.validator.BuilderSelection.MaxProfit; builderBoostFactor = builderBoostFactor ?? BigInt(100); if (builderBoostFactor > MAX_BUILDER_BOOST_FACTOR) { - throw Error(`Invalid builderBoostFactor=${builderBoostFactor} > MAX_BUILDER_BOOST_FACTOR`); + throw new ApiError(400, `Invalid builderBoostFactor=${builderBoostFactor} > MAX_BUILDER_BOOST_FACTOR`); } const isBuilderEnabled = ForkSeq[fork] >= ForkSeq.bellatrix && chain.executionBuilder !== undefined && - builderSelection !== routes.validator.BuilderSelection.ExecutionOnly && - builderBoostFactor !== BigInt(0); + builderSelection !== routes.validator.BuilderSelection.ExecutionOnly; logger.verbose("Assembling block with produceEngineOrBuilderBlock ", { fork,