diff --git a/.changeset/chilled-kangaroos-dream.md b/.changeset/chilled-kangaroos-dream.md new file mode 100644 index 0000000000..a1edaf3719 --- /dev/null +++ b/.changeset/chilled-kangaroos-dream.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/store-indexer": patch +--- + +Fixes postgres indexer stopping sync after it catches up to the latest block. diff --git a/packages/store-indexer/bin/postgres-indexer.ts b/packages/store-indexer/bin/postgres-indexer.ts index 8370b10338..64cc564f24 100644 --- a/packages/store-indexer/bin/postgres-indexer.ts +++ b/packages/store-indexer/bin/postgres-indexer.ts @@ -105,6 +105,8 @@ const { latestBlockNumber$, storedBlockLogs$ } = await createStoreSync({ maxBlockRange: env.MAX_BLOCK_RANGE, }); +storedBlockLogs$.subscribe(); + combineLatest([latestBlockNumber$, storedBlockLogs$]) .pipe( filter(