Skip to content

Commit

Permalink
Merge pull request zkLinkProtocol#124 from zkLinkProtocol/feat-direct…
Browse files Browse the repository at this point in the history
…PointOp

fix direct points.
  • Loading branch information
zkcarter authored Jul 27, 2024
2 parents 3ef6c57 + b45e6a5 commit d46d60f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/migrations/1722047331856-UpdateDirectPointProcessingStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from "typeorm";

export class UpdateDirectPointProcessingStatus1722047331856 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
UPDATE "directHoldProcessingStatus"
SET "pointProcessed" = false
WHERE "blockNumber" in (4481678, 4494637, 4507425, 4520163);
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {}
}
3 changes: 1 addition & 2 deletions src/points/directPoint.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ export class DirectPointService extends Worker {
const addressTvlMap: Map<string, BlockAddressTvl> = new Map();
const addressBufferList = await this.balanceRepository.getAllAddressesByBlock(blockNumber);
this.logger.log(`The address list length: ${addressBufferList.length}`);
// for (const addressBuffer of addressBufferList) {
for (const addressBuffer of addressBufferList.slice(0, 100)) {
for (const addressBuffer of addressBufferList) {
const address = hexTransformer.from(addressBuffer);
const addressTvl = await this.calculateAddressTvl(address, blockNumber, tokenPriceMap, blockTs);
// if (addressTvl.tvl.gt(new BigNumber(0))) {
Expand Down

0 comments on commit d46d60f

Please sign in to comment.