Skip to content

Commit

Permalink
move back
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei authored and turbocrime committed Aug 20, 2024
1 parent f78d415 commit f89ff9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/query/src/block-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ export class BlockProcessor implements BlockProcessorInterface {
if (compactBlock.height > latestKnownBlockHeight) {
latestKnownBlockHeight = compactBlock.height;
}

const isLastBlockOfEpoch = !!compactBlock.epochRoot;
if (isLastBlockOfEpoch) {
await this.handleEpochTransition(compactBlock.height, latestKnownBlockHeight);
}
}
}

Expand Down Expand Up @@ -354,6 +349,11 @@ export class BlockProcessor implements BlockProcessorInterface {
);
}

const isLastBlockOfEpoch = !!compactBlock.epochRoot;
if (isLastBlockOfEpoch) {
await this.handleEpochTransition(compactBlock.height, latestKnownBlockHeight);
}

if (globalThis.__ASSERT_ROOT__) {
await this.assertRootValid(compactBlock.height);
}
Expand Down

0 comments on commit f89ff9d

Please sign in to comment.