From 42867d5af365233141ef3f36dd698aa283a5fafe Mon Sep 17 00:00:00 2001 From: harkamal Date: Sat, 22 Jul 2023 12:10:03 +0530 Subject: [PATCH] cleanup --- packages/beacon-node/src/api/impl/beacon/blocks/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts index cda965c33b76..082188834d67 100644 --- a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts @@ -247,10 +247,11 @@ export function getBeaconBlockApi({ break; case routes.beacon.BroadcastValidation.consensus: { - // check if this beacon node produced the block else log warning for now + // check if this beacon node produced the block else run validations const blockRoot = toHex( chain.config.getForkTypes(signedBlock.message.slot).BeaconBlock.hashTreeRoot(signedBlock.message) ); + if (!chain.producedBlockRoot.has(blockRoot) && !chain.producedBlindedBlockRoot.has(blockRoot)) { // error or log warning that we support consensus val on blocks produced via this beacon node const message = "Consensus validation not implemented yet for block not produced by this beacon node"; @@ -265,7 +266,7 @@ export function getBeaconBlockApi({ default: { // error or log warning we do not support this validation - const message = `Broadcast validation of ${broadcastValidation} type implemented yet`; + const message = `Broadcast validation of ${broadcastValidation} type not implemented yet`; if (chain.opts.broadcastValidationStrictness === "error") { throw Error(message); } else {