Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ linters:
- iface
- ineffassign
- interfacebloat
- intrange
- loggercheck
- misspell
- nilerr
Expand Down
2 changes: 1 addition & 1 deletion internal/bft/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func getLeaderID(
return nodes[view%n]
}

for i := range len(nodes) {
for i := range nodes {
index := (view + (decisionsInView / decisionsPerLeader)) + uint64(i)
node := nodes[index%n]
_, exists := blackListed[node]
Expand Down
4 changes: 2 additions & 2 deletions internal/bft/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1232,9 +1232,9 @@ func TestDiscoverDeliberateCensorship(t *testing.T) {
// Send some un-related messages, to ensure we processed the messages before this one.
// We send exactly 10 * int(view.N) + 2 (the incoming messages buffer size) so that we
// are sure that the above 2 messages were processed.
// Otherwise we might finish the test too early and get a false negative (Sync would have been
// Otherwise, we might finish the test too early and get a false negative (Sync would have been
// called wrongly had the test been run for longer).
for i := 0; i < 10*int(view.N)+2; i++ {
for range 10*view.N + 2 {
view.HandleMessage(2, prepare)
}

Expand Down
Loading
Loading