Skip to content

Commit 72cb9ea

Browse files
committed
Revert change to block store
1 parent 6f7b9b8 commit 72cb9ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

yarn-project/archiver/src/archiver/kv_archiver_store/block_store.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ export class BlockStore {
8989
throw new InitialBlockNumberNotSequentialError(firstBlockNumber, previousBlockNumber);
9090
}
9191

92-
// Iterate over blocks array and insert them, checking that the block numbers have no gaps.
93-
// We do accept repeated blocks in case there was a prune and a block with the same number is added.
92+
// Iterate over blocks array and insert them, checking that the block numbers are sequential.
9493
let previousBlock: PublishedL2Block | undefined = undefined;
9594
for (const block of blocks) {
96-
if (!opts.force && previousBlock && previousBlock.block.number + 1 < block.block.number) {
95+
if (!opts.force && previousBlock && previousBlock.block.number + 1 !== block.block.number) {
9796
throw new BlockNumberNotSequentialError(block.block.number, previousBlock.block.number);
9897
}
9998
previousBlock = block;

0 commit comments

Comments
 (0)