Skip to content

Commit

Permalink
console.time
Browse files Browse the repository at this point in the history
  • Loading branch information
ironoa committed Jun 28, 2024
1 parent bf9d7d1 commit 90f0671
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/polkadot-k8s-payouts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: Polkadot K8s Payouts
name: polkadot-k8s-payouts
version: v1.2.12
appVersion: v1.2.12
version: v1.2.13
appVersion: v1.2.13
apiVersion: v2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polkadot-payouts",
"version": "1.2.12",
"version": "1.2.13",
"description": "Automated transfers among accounts",
"repository": "[email protected]:w3f/accountant.git",
"author": "W3F Infrastructure Team <[email protected]>",
Expand Down
6 changes: 4 additions & 2 deletions src/claimer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ export class Claimer {

}

console.time("gatherUnclaimedInfo")
for (const [address, validatorInfo] of validatorsMap) {
await this.gatherUnclaimedInfo(address,validatorInfo)
}
console.timeEnd("gatherUnclaimedInfo")

return validatorsMap
}
Expand Down Expand Up @@ -146,7 +148,7 @@ export class Claimer {

const claimedIdx: Set<number> = new Set<number>

console.time("stakingQuery")
// console.time("stakingQuery")
// const stakingQuery = await this.api.derive.staking.query(validatorAddress,{withLedger:true, withClaimedRewardsEras: false}) //withClaimedRewardsEras: true is heavy apparently => https://github.com/polkadot-js/api/issues/5923
// stakingQuery.stakingLedger.legacyClaimedRewards.forEach(r=>claimedIdx.add(r.toNumber()))
// stakingQuery.claimedRewardsEras.forEach(r=>claimedIdx.add(r.toNumber()))
Expand All @@ -158,7 +160,7 @@ export class Claimer {
claimedIdx.add(i)
}
}
console.timeEnd("stakingQuery")
// console.timeEnd("stakingQuery")


const unclaimed: number[] = Array.from(setDifference(ownRewardsIdx,claimedIdx))
Expand Down

0 comments on commit 90f0671

Please sign in to comment.