diff --git a/packages/cli/src/cmds/beacon/initBeaconState.ts b/packages/cli/src/cmds/beacon/initBeaconState.ts index 0d2cebd85afa..c4b036508d39 100644 --- a/packages/cli/src/cmds/beacon/initBeaconState.ts +++ b/packages/cli/src/cmds/beacon/initBeaconState.ts @@ -42,7 +42,7 @@ async function initAndVerifyWeakSubjectivityState( if (!allForks.isWithinWeakSubjectivityPeriod(config, store, wsState, wsCheckpoint)) { throw new Error("Fetched weak subjectivity checkpoint not within weak subjectivity period."); } - return await initStateFromAnchorState(config, db, logger, wsState); + return await initStateFromAnchorState(config, db, logger, wsState.slot > store.slot ? wsState : store); } /**