diff --git a/src/indexer/index.ts b/src/indexer/index.ts index 01a1e4e..f18d595 100644 --- a/src/indexer/index.ts +++ b/src/indexer/index.ts @@ -88,9 +88,10 @@ export class RunestoneIndexer { blockhash = (await this._rpc.getblockhash({ height: blockheight })).result; storageBlockHash = await this._storage.getBlockhash(blockheight); } + reorgBlockhashesToIndex.reverse(); // process blocks that are reorgs - for (const blockhash of reorgBlockhashesToIndex.toReversed()) { + for (const blockhash of reorgBlockhashesToIndex) { const blockResult = await this._rpc.getblock({ blockhash, verbosity: 2 }); if (blockResult.error !== null) { throw blockResult.error;