Skip to content

Commit

Permalink
fix: reorg bug (#1250)
Browse files Browse the repository at this point in the history
* fix: reorg bug

* chore: changeset
  • Loading branch information
kyscott18 authored Nov 18, 2024
1 parent 680b54e commit a142bbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-dolls-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ponder/core": patch
---

Fixed a bug in reorg reconciliation logic.
2 changes: 2 additions & 0 deletions packages/core/src/bin/utils/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ export async function run({
break;
}
case "reorg":
await database.removeTriggers();
await database.revert({ checkpoint: event.checkpoint });
await database.createTriggers();

break;

Expand Down

0 comments on commit a142bbd

Please sign in to comment.