Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 31, 2024
1 parent f2b292b commit 95b784e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yarn-project/world-state/src/world-state-db/merkle_trees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ export class MerkleTrees implements MerkleTreeDb {

async #updateArchive(header: Header, includeUncommitted: boolean) {
const state = await this.getStateReference(includeUncommitted);
// TODO(benesjan): Is this even needed here?

// This method should be called only when the block builder already updated the state so we sanity check that it's
// the case here.
if (!state.toBuffer().equals(header.state.toBuffer())) {
throw new Error('State in header does not match current state');
}
Expand Down

0 comments on commit 95b784e

Please sign in to comment.