From 64cae97cdecc64ca6edb25edae0aca155433f20a Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 6 Aug 2024 18:36:48 -0300 Subject: [PATCH] Fix tests --- yarn-project/prover-client/src/orchestrator/orchestrator.ts | 4 +++- yarn-project/sequencer-client/src/sequencer/sequencer.test.ts | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator.ts b/yarn-project/prover-client/src/orchestrator/orchestrator.ts index 2bd0a317b210..78760bc7e3c3 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.ts @@ -146,10 +146,12 @@ export class ProvingOrchestrator implements BlockProver { throw new Error(`Length of txs for the block should be at least two (got ${numTxs})`); } + // TODO(palla/prover-node): Store block number in the db itself to make this check more reliable, + // and turn this warning into an exception that we throw. const { blockNumber } = globalVariables; const dbBlockNumber = (await this.db.getTreeInfo(MerkleTreeId.ARCHIVE)).size - 1n; if (dbBlockNumber !== blockNumber.toBigInt() - 1n) { - throw new Error( + logger.warn( `Database is at wrong block number (starting block ${blockNumber.toBigInt()} with db at ${dbBlockNumber})`, ); } diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts index 985a2247c873..912d9ebe6b1e 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts @@ -448,7 +448,6 @@ describe('sequencer', () => { await sequencer.work(); expect(publisher.processL2Block).not.toHaveBeenCalled(); - expect(blockProver.cancelBlock).toHaveBeenCalledTimes(1); }); });