Skip to content

Commit b92a796

Browse files
Park Juhyungjoojis
authored andcommitted
Hot fix the snapshot query by increasing page size
1 parent 3d29ef6 commit b92a796

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/models/logic/utxo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ export async function getSnapshot(params: {
456456
fromTransactionIndex,
457457
fromTransactionOutputIndex
458458
] = lastEvaluatedKey || [Number.MAX_SAFE_INTEGER, 0, 0];
459-
const itemsPerPage = 100;
459+
const max32bit = 2147483647;
460+
const itemsPerPage = max32bit - 10;
460461

461462
const rows = await models.sequelize.query(
462463
`SELECT SUM("UTXO"."quantity") AS "totalAssetQuantity", "UTXO"."address", "UTXO"."assetType",

0 commit comments

Comments
 (0)