From 395b7e0a4ddaeb6c5972df20085bddc0d53ac051 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 11 Mar 2026 23:21:07 +0000 Subject: [PATCH] fix(e2e): set anvilSlotsInAnEpoch in offchain payment test to prevent premature finalization --- yarn-project/end-to-end/src/e2e_offchain_payment.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/src/e2e_offchain_payment.test.ts b/yarn-project/end-to-end/src/e2e_offchain_payment.test.ts index ffe2fd7ce271..83c5f8634a29 100644 --- a/yarn-project/end-to-end/src/e2e_offchain_payment.test.ts +++ b/yarn-project/end-to-end/src/e2e_offchain_payment.test.ts @@ -29,7 +29,11 @@ describe('e2e_offchain_payment', () => { jest.setTimeout(TIMEOUT); beforeAll(async () => { - ({ teardown, wallet, accounts, aztecNode, aztecNodeAdmin, cheatCodes } = await setup(2)); + ({ teardown, wallet, accounts, aztecNode, aztecNodeAdmin, cheatCodes } = await setup(2, { + // Use 32 slots/epoch so Anvil's finalized block lags far behind latest, + // preventing the reorg test from hitting "Cannot rollback to block N as it is before finalized M". + anvilSlotsInAnEpoch: 32, + })); }); afterAll(() => teardown());