Skip to content

Commit

Permalink
Reverse blockhash to index in reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
me-rob committed Apr 25, 2024
1 parent c674d59 commit b507778
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magiceden-oss/runestone-lib",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class RunestoneIndexer {
}

// process blocks that are reorgs
for (const blockhash of reorgBlockhashesToIndex) {
for (const blockhash of reorgBlockhashesToIndex.toReversed()) {
const blockResult = await this._rpc.getblock({ blockhash, verbosity: 2 });
if (blockResult.error !== null) {
throw blockResult.error;
Expand Down

0 comments on commit b507778

Please sign in to comment.