Skip to content

Commit

Permalink
fix: optimize account statistic query internal tx
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Aug 29, 2024
1 parent 1385988 commit e4b7773
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/evm/statistic/account_statistics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ export default class EVMAccountStatisticsService extends BullableService {
.orderBy('index', 'asc')
.withGraphFetched('[evm_internal_transactions]')
.modifyGraph('evm_internal_transactions', (builder) => {
builder.andWhere('id', '>=', fromTx.id).andWhere('id', '<=', toTx.id);
builder
.andWhere('evm_tx_id', '>=', fromTx.id)
.andWhere('evm_tx_id', '<=', toTx.id);
});
dailyTxs.forEach((tx) => {
if (!accountStats[tx.from]) {
Expand Down

0 comments on commit e4b7773

Please sign in to comment.