Skip to content

Commit

Permalink
fix: add order when query block
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Aug 8, 2023
1 parent ace392f commit a827dc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/crawl-tx/crawl_tx.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export default class CrawlTxService extends BullableService {
knex.raw("\"data\" #>ARRAY['block', 'data', 'txs'] AS txs")
)
.where('height', '>', startBlock)
.andWhere('height', '<=', endBlock);
.andWhere('height', '<=', endBlock)
.orderBy('height', 'asc');
this.logger.debug(blocks);
const promises: any[] = [];
const mapBlockTime: Map<number, string> = new Map();
Expand Down

0 comments on commit a827dc4

Please sign in to comment.