Skip to content

Commit

Permalink
fix signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed May 12, 2022
1 parent 16d4fae commit 794483a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/lodestar/src/chain/blocks/verifyBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ export async function verifyBlock(
): Promise<FullyVerifiedBlock> {
const parentBlock = verifyBlockSanityChecks(chain, partiallyVerifiedBlock);

const processedBlockData = await verifyBlockStateTransition(chain, partiallyVerifiedBlock, opts);
const {postState, executionStatus} = await verifyBlockStateTransition(chain, partiallyVerifiedBlock, opts);

return {
block: partiallyVerifiedBlock.block,
postState,
parentBlock,
skipImportingAttestations: partiallyVerifiedBlock.skipImportingAttestations,
...processedBlockData,
executionStatus,
};
}

Expand Down Expand Up @@ -318,14 +319,14 @@ export async function verifyBlockStateTransition(

// All checks have passed, if this is a merge transition block we can log
if (isMergeTransitionBlock) {
logOnPowBlock(chain, block);
logOnPowBlock(chain, block as bellatrix.SignedBeaconBlock);
}

return {postState, executionStatus};
}

function logOnPowBlock(chain: VerifyBlockModules, block: allForks.SignedBeaconBlock): void {
const mergeBlock = block.message as bellatrix.BeaconBlock;
function logOnPowBlock(chain: VerifyBlockModules, block: bellatrix.SignedBeaconBlock): void {
const mergeBlock = block.message;
const mergeBlockHash = toHexString(chain.config.getForkTypes(mergeBlock.slot).BeaconBlock.hashTreeRoot(mergeBlock));
const mergeExecutionHash = toHexString(mergeBlock.body.executionPayload.blockHash);
const mergePowHash = toHexString(mergeBlock.body.executionPayload.parentHash);
Expand Down

0 comments on commit 794483a

Please sign in to comment.