File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
indexer/src/kadena-server/repository/infra Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,6 @@ export default class TransactionQueryBuilder {
264264 FROM "Transactions" t
265265 ${ transactionsConditions }
266266 ORDER BY t.creationtime ${ order } , t.id ${ order }
267- LIMIT $1
268267 )
269268 SELECT
270269 t.id AS id,
@@ -294,6 +293,7 @@ export default class TransactionQueryBuilder {
294293 JOIN "Blocks" b ON b.id = t."blockId"
295294 ${ params . isCoinbase ? 'LEFT ' : '' } JOIN "TransactionDetails" td ON t.id = td."transactionId"
296295 ${ blocksConditions }
296+ LIMIT $1
297297 ` ;
298298 }
299299
Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ export default class TransactionDbRepository implements TransactionRepository {
484484 } = params ;
485485
486486 const transactionsParams : ( string | number ) [ ] = [ ] ;
487- const blockParams : ( string | number ) [ ] = [ ] ;
487+ const blockParams : ( string | number | boolean ) [ ] = [ ] ;
488488 let transactionsConditions = '' ;
489489 let blocksConditions = '' ;
490490
@@ -529,6 +529,10 @@ export default class TransactionDbRepository implements TransactionRepository {
529529 }
530530
531531 const paramsOffset = transactionsParams . length ;
532+
533+ blockParams . push ( true ) ;
534+ blocksConditions += `\nWHERE b.canonical = $${ paramsOffset + blockParams . length } ` ;
535+
532536 if ( blockHash ) {
533537 blockParams . push ( blockHash ) ;
534538 const op = localOperator ( blockParams . length ) ;
You can’t perform that action at this time.
0 commit comments