From 5f5d444d2cb01066951a6b8cb3099d47d5076156 Mon Sep 17 00:00:00 2001 From: dbanks12 Date: Wed, 11 Dec 2024 18:51:22 +0000 Subject: [PATCH] fix: attempt to fix flake in e2e cross chain messaging test --- yarn-project/simulator/src/avm/journal/journal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/simulator/src/avm/journal/journal.ts b/yarn-project/simulator/src/avm/journal/journal.ts index 8cdc8dba107d..2d0ab2f7a5f8 100644 --- a/yarn-project/simulator/src/avm/journal/journal.ts +++ b/yarn-project/simulator/src/avm/journal/journal.ts @@ -379,8 +379,8 @@ export class AvmPersistableStateManager { } else { // Sanity check that the leaf value is skipped by low leaf when it doesn't exist assert( - siloedNullifier.toBigInt() > leafPreimage.nullifier.toBigInt() && - siloedNullifier.toBigInt() < leafPreimage.nextNullifier.toBigInt(), + leafPreimage.nullifier.toBigInt() < siloedNullifier.toBigInt() && + (leafPreimage.nextIndex === 0n || leafPreimage.nextNullifier.toBigInt() > siloedNullifier.toBigInt()), 'Nullifier tree low leaf should skip the target leaf nullifier when the target leaf does not exist.', ); }