From 0fea14a147c607159227cd700cf92b58471140b6 Mon Sep 17 00:00:00 2001 From: Mitch Date: Tue, 26 Nov 2024 13:08:23 -0500 Subject: [PATCH] fix #9918 --- yarn-project/end-to-end/src/spartan/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/src/spartan/utils.ts b/yarn-project/end-to-end/src/spartan/utils.ts index fe34c31534a..10d8c6829f8 100644 --- a/yarn-project/end-to-end/src/spartan/utils.ts +++ b/yarn-project/end-to-end/src/spartan/utils.ts @@ -355,7 +355,11 @@ export async function awaitL2BlockNumber( await sleep(1000); tips = await rollupCheatCodes.getTips(); } - logger.info(`Reached L2 Block ${tips.pending}`); + if (Date.now() >= endTime) { + throw new Error(`Timeout waiting for L2 Block ${blockNumber}`); + } else { + logger.info(`Reached L2 Block ${tips.pending}`); + } } export async function restartBot(namespace: string, logger: Logger) {