Skip to content

Commit

Permalink
fix: move reset above for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Amuhar committed Jan 9, 2024
1 parent cda57f4 commit 9e54b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jobs/keys-update/keys-update.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ export class KeysUpdateService {
this.prometheusService.registryLastUpdate.set(elMeta.timestamp);
this.prometheusService.registryBlockNumber.set(elMeta.blockNumber);

this.prometheusService.registryNumberOfKeysBySRModuleAndOperator.reset();

for (const module of stakingModules) {
const moduleInstance = this.stakingRouterService.getStakingRouterModuleImpl(module.type);

Expand All @@ -176,7 +178,6 @@ export class KeysUpdateService {

// get operators
const operators = await moduleInstance.getOperators(module.stakingModuleAddress);
this.prometheusService.registryNumberOfKeysBySRModuleAndOperator.reset();

operators.forEach((operator) => {
this.prometheusService.registryNumberOfKeysBySRModuleAndOperator.set(
Expand Down

0 comments on commit 9e54b81

Please sign in to comment.