Skip to content

Commit

Permalink
Fix the merge block found condition while syncing (#4398)
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Aug 11, 2022
1 parent 0de0144 commit 1901f97
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export async function verifyBlocksExecutionPayload(
executionStatuses.push(executionStatus);

const isMergeTransitionBlock =
// If the merge block is found, stop the search as the isMergeTransitionBlockFn condition
// will still evalute to true for the following blocks leading to errors (while syncing)
// as the preState0 still belongs to the pre state of the first block on segment
mergeBlockFound === null &&
isBellatrixStateType(preState0) &&
isBellatrixBlockBodyType(block.message.body) &&
isMergeTransitionBlockFn(preState0, block.message.body);
Expand Down

0 comments on commit 1901f97

Please sign in to comment.