Skip to content

Commit

Permalink
Merge 59bbc3f into 4069b41
Browse files Browse the repository at this point in the history
  • Loading branch information
jeluard committed Mar 27, 2024
2 parents 4069b41 + 59bbc3f commit 9c0cede
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/beacon-node/src/api/impl/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,6 @@ export function getValidatorApi({
throw Error("Builder and engine both failed to produce the block within timeout");
}

if (builder.status === "rejected" && engine.status === "rejected") {
throw Error("Builder and engine both failed to produce the block");
}

if (engine.status === "rejected" && isEngineEnabled) {
logger.warn(
"Engine failed to produce the block",
Expand All @@ -617,6 +613,12 @@ export function getValidatorApi({
);
}

if (builder.status === "rejected" && engine.status === "rejected") {
throw Error(
`${isBuilderEnabled && isEngineEnabled ? "Builder and engine both" : isBuilderEnabled ? "Builder" : "Engine"} failed to produce the block`
);
}

// handle shouldOverrideBuilder separately
if (engine.status === "fulfilled" && engine.value.shouldOverrideBuilder) {
logger.info("Selected engine block: censorship suspected in builder blocks", {
Expand Down

0 comments on commit 9c0cede

Please sign in to comment.