relab / hotstuff

MIT License
166 stars 52 forks source link

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

Open meling opened 4 months ago

meling commented 4 months ago

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

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

It should do this:

numVotes := voters.Len()