Skip to content

Commit

Permalink
fixes for spec complaince
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jan 8, 2024
1 parent 15948e8 commit 0119cd9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/beacon-node/src/api/impl/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0119cd9

Please sign in to comment.