@@ -205,6 +205,10 @@ describe('rpc-multi-trees', () => {
205205
206206 it ( 'getMultipleCompressedAccountProofs in transfer loop should match' , async ( ) => {
207207 for ( let round = 0 ; round < numberOfTransfers ; round ++ ) {
208+ // Wait for indexer to be consistent
209+ const slot = await rpc . getSlot ( ) ;
210+ await rpc . confirmTransactionIndexed ( slot ) ;
211+
208212 const prePayerAccounts = await rpc . getCompressedAccountsByOwner (
209213 payer . publicKey ,
210214 ) ;
@@ -222,8 +226,12 @@ describe('rpc-multi-trees', () => {
222226 const actualQueue = proof . treeInfo . queue ;
223227
224228 console . log ( `Iteration ${ round + 1 } , Account ${ index } :` ) ;
225- console . log ( ` Expected tree (from getCompressedAccountsByOwner): ${ expectedTree . toBase58 ( ) } ` ) ;
226- console . log ( ` Actual tree (from getMultipleCompressedAccountProofs): ${ actualTree . toBase58 ( ) } ` ) ;
229+ console . log (
230+ ` Expected tree (from getCompressedAccountsByOwner): ${ expectedTree . toBase58 ( ) } ` ,
231+ ) ;
232+ console . log (
233+ ` Actual tree (from getMultipleCompressedAccountProofs): ${ actualTree . toBase58 ( ) } ` ,
234+ ) ;
227235 console . log ( ` Expected queue: ${ expectedQueue . toBase58 ( ) } ` ) ;
228236 console . log ( ` Actual queue: ${ actualQueue . toBase58 ( ) } ` ) ;
229237
@@ -238,7 +246,9 @@ describe('rpc-multi-trees', () => {
238246 } ) ;
239247
240248 const tree = selectStateTreeInfo ( await rpc . getStateTreeInfos ( ) ) ;
241- console . log ( `Selected tree for transfer in round ${ round + 1 } : ${ tree . tree . toBase58 ( ) } ` ) ;
249+ console . log (
250+ `Selected tree for transfer in round ${ round + 1 } : ${ tree . tree . toBase58 ( ) } ` ,
251+ ) ;
242252 await transfer ( rpc , payer , transferAmount , payer , bob . publicKey ) ;
243253 executedTxs ++ ;
244254 }
0 commit comments