We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0611b81 commit 67546c6Copy full SHA for 67546c6
src/testing/transaction-logger.ts
@@ -49,9 +49,10 @@ export class TransactionLogger {
49
return new Proxy<Algodv2>(algod, new TransactionLoggingAlgodv2ProxyHandler(this))
50
}
51
52
- /** Wait until all logged transactions IDs appear in the given `Indexer`. */
53
- async waitForIndexer(indexer: Indexer) {
54
- await Promise.all(this._sentTransactionIds.map((txnId) => runWhenIndexerCaughtUp(() => indexer.lookupTransactionByID(txnId).do())))
+ /** Wait until indexer has the last round from algod. */
+ async waitForIndexer(algod: Algodv2, indexer: Indexer) {
+ const round = (await algod.status().do()).lastRound
55
+ await runWhenIndexerCaughtUp(() => indexer.lookupBlock(round).do())
56
57
58
0 commit comments