Skip to content

Commit

Permalink
fix: wait for tx to be re-included (#9964)
Browse files Browse the repository at this point in the history
Fix #9635

---------

Co-authored-by: Santiago Palladino <[email protected]>
  • Loading branch information
alexghr and spalladino authored Nov 14, 2024
1 parent 7e587d6 commit 9370c91
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
EpochProofQuotePayload,
TxStatus,
createDebugLogger,
retryUntil,
sleep,
} from '@aztec/aztec.js';
import { type AztecAddress, EthAddress } from '@aztec/circuits.js';
Expand Down Expand Up @@ -402,6 +403,12 @@ describe('e2e_prover_coordination', () => {

// Wait a bit for the sequencer / node to notice a re-org
await sleep(2000);
await retryUntil(
async () => (await ctx.aztecNode.getTxReceipt(tx2BeforeReorg.txHash)).status === TxStatus.SUCCESS,
'wait for re-inclusion',
60,
1,
);

// the sequencer will add valid txs again but in a new block
const tx2AfterReorg = await ctx.aztecNode.getTxReceipt(tx2BeforeReorg.txHash);
Expand Down

0 comments on commit 9370c91

Please sign in to comment.