Skip to content

Commit

Permalink
chore: update test to have proven block
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Sep 24, 2024
1 parent e73d9f1 commit 3019adb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions yarn-project/archiver/src/archiver/archiver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { MemoryArchiverStore } from './memory_archiver_store/memory_archiver_sto

interface MockRollupContractRead {
archiveAt: (args: readonly [bigint]) => Promise<`0x${string}`>;
getProvenBlockNumber: () => Promise<bigint>;
status: (args: readonly [bigint]) => Promise<[bigint, `0x${string}`, bigint, `0x${string}`, `0x${string}`]>;
}

Expand Down Expand Up @@ -97,15 +96,19 @@ describe('Archiver', () => {

rollupRead.status
.mockResolvedValueOnce([0n, GENESIS_ROOT, 1n, blocks[0].archive.root.toString(), GENESIS_ROOT])
.mockResolvedValue([0n, GENESIS_ROOT, 3n, blocks[2].archive.root.toString(), blocks[0].archive.root.toString()]);
.mockResolvedValue([
1n,
blocks[0].archive.root.toString(),
3n,
blocks[2].archive.root.toString(),
blocks[0].archive.root.toString(),
]);

mockGetLogs({
messageSent: [makeMessageSentEvent(98n, 1n, 0n), makeMessageSentEvent(99n, 1n, 1n)],
L2BlockProposed: [makeL2BlockProposedEvent(101n, 1n, blocks[0].archive.root.toString())],
});

rollupRead.getProvenBlockNumber.mockResolvedValueOnce(1n);

mockGetLogs({
messageSent: [
makeMessageSentEvent(2504n, 2n, 0n),
Expand Down

0 comments on commit 3019adb

Please sign in to comment.