hotstuff icon indicating copy to clipboard operation
hotstuff copied to clipboard

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

Open meling opened this issue 11 months ago • 0 comments

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

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

It should do this:

numVotes := voters.Len()

meling avatar Mar 09 '24 15:03 meling