diff --git a/yarn-project/node-lib/src/actions/snapshot-sync.ts b/yarn-project/node-lib/src/actions/snapshot-sync.ts index 6d7274b3c2b1..d60760bf6aa1 100644 --- a/yarn-project/node-lib/src/actions/snapshot-sync.ts +++ b/yarn-project/node-lib/src/actions/snapshot-sync.ts @@ -82,7 +82,11 @@ export async function trySnapshotSync(config: SnapshotSyncConfig, log: Logger) { } const currentL1BlockNumber = await getPublicClient(config).getBlockNumber(); - if (archiverL1BlockNumber && currentL1BlockNumber - archiverL1BlockNumber < minL1BlocksToTriggerReplace) { + if ( + archiverL1BlockNumber && + currentL1BlockNumber >= archiverL1BlockNumber && + currentL1BlockNumber - archiverL1BlockNumber < minL1BlocksToTriggerReplace + ) { log.verbose( `Skipping snapshot sync as archiver is less than ${ currentL1BlockNumber - archiverL1BlockNumber