Skip to content

Commit

Permalink
fix(cmd/paratime): Fix proposer stats
Browse files Browse the repository at this point in the history
  • Loading branch information
peternose committed Oct 27, 2023
1 parent f118362 commit c0eaabb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cmd/paratime/statistics.go
Expand Up @@ -379,14 +379,15 @@ var statsCmd = &cobra.Command{
}
seen[member.PublicKey] = true

if member.Role == scheduler.RoleWorker {
switch member.Role {
case scheduler.RoleWorker:
stats.entities[entity].roundsPrimary++
}
if member.Role == scheduler.RoleBackupWorker {
if member.PublicKey == currentScheduler.PublicKey {
stats.entities[entity].roundsProposer++
}
case scheduler.RoleBackupWorker:
stats.entities[entity].roundsBackup++
}
if member.PublicKey == currentScheduler.PublicKey {
stats.entities[entity].roundsProposer++
case scheduler.RoleInvalid:
}
}
}
Expand Down

0 comments on commit c0eaabb

Please sign in to comment.