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 22eaf61
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/paratime/statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ var statsCmd = &cobra.Command{
}
seen[member.PublicKey] = true

if member.Role == scheduler.RoleWorker {
switch member.Role {

Check failure on line 382 in cmd/paratime/statistics.go

View workflow job for this annotation

GitHub Actions / lint

missing cases in switch of type api.Role: api.RoleInvalid (exhaustive)
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++
}
}
}
}
Expand Down

0 comments on commit 22eaf61

Please sign in to comment.