Skip to content

Commit

Permalink
fix: reduce batching to 4500
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Nov 2, 2023
1 parent 6381760 commit 8fd770b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pg/pg-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ export class PgStore extends BasePgStore {
}
}
}
// Divide insertion array into chunks of 5000 in order to avoid the postgres limit of 65534
// Divide insertion array into chunks of 4500 in order to avoid the postgres limit of 65534
// query params.
for (const writeChunk of chunkArray(writes, 5000))
for (const writeChunk of chunkArray(writes, 4500))
await this.insertInscriptions(writeChunk);
updatedBlockHeightMin = Math.min(updatedBlockHeightMin, event.block_identifier.index);
if (ENV.BRC20_BLOCK_SCAN_ENABLED)
Expand Down

0 comments on commit 8fd770b

Please sign in to comment.