Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jun 4, 2024
1 parent 7131928 commit ef5ee50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion yarn-project/circuit-types/src/interfaces/sync-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
export type SyncStatus = {
/** Up to which block has been synched for blocks and txs. */
blocks: number;
/** Up to which block has been synched for notes, indexed by each public key being monitored. */
/** Up to which block has been synched for notes, indexed by each account address being monitored. */
notes: Record<string, number>;
};
6 changes: 2 additions & 4 deletions yarn-project/end-to-end/src/benchmarks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ export async function waitNewPXESynced(
*/
export async function waitRegisteredAccountSynced(pxe: PXE, secretKey: Fr, partialAddress: PartialAddress) {
const l2Block = await pxe.getBlockNumber();
const masterIncomingViewingPublicKey = (await pxe.registerAccount(secretKey, partialAddress)).publicKeys
.masterIncomingViewingPublicKey;
const isAccountSynced = async () =>
(await pxe.getSyncStatus()).notes[masterIncomingViewingPublicKey.toString()] === l2Block;
const accountAddress = (await pxe.registerAccount(secretKey, partialAddress)).address;
const isAccountSynced = async () => (await pxe.getSyncStatus()).notes[accountAddress.toString()] === l2Block;
await retryUntil(isAccountSynced, 'pxe-notes-sync');
}

0 comments on commit ef5ee50

Please sign in to comment.