Skip to content

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

@meling

Description

@meling

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

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

It should do this:

numVotes := voters.Len()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions