Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Don't ForEach when Len is what you want #116

Closed
meling opened this issue Mar 9, 2024 · 0 comments · Fixed by #146
Closed

Chore: Don't ForEach when Len is what you want #116

meling opened this issue Mar 9, 2024 · 0 comments · Fixed by #146

Comments

@meling
Copy link
Member

meling commented Mar 9, 2024

In leaderrotation/reputation.go:59-62 we do this:

numVotes := 0
voters.ForEach(func(hotstuff.ID) {
	numVotes++
})

It should do this:

numVotes := voters.Len()
@AlanRostem AlanRostem linked a pull request Jan 6, 2025 that will close this issue
meling added a commit that referenced this issue Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant