Skip to content

Commit

Permalink
fix: batch size to 2000
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Nov 12, 2023
1 parent 3bc1f53 commit 9cf9230
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 @@ -254,9 +254,9 @@ export class PgStore extends BasePgStore {
currentBlockHeight: currentBlockHeight,
newBlockHeight: block_height,
});
// Divide insertion array into chunks of 3000 in order to avoid the postgres limit of 65534
// Divide insertion array into chunks of 2000 in order to avoid the postgres limit of 65534
// query params.
for (const writeChunk of batchIterate(writes, 3000))
for (const writeChunk of batchIterate(writes, 2000))
await this.insertInscriptions(writeChunk);
updatedBlockHeightMin = Math.min(updatedBlockHeightMin, event.block_identifier.index);
if (ENV.BRC20_BLOCK_SCAN_ENABLED)
Expand Down

0 comments on commit 9cf9230

Please sign in to comment.