Skip to content

Commit

Permalink
[bug fix] Fix panic when there is only one entity in dac
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Jun 7, 2024
1 parent 4f1d5ac commit c0ba17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataavailability/datacommittee/datacommittee.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (d *Backend) Init() error {
if committee != nil {
d.committeeMembers = committee.Members
if len(committee.Members) > 0 {
selectedCommitteeMember = rand.Intn(len(committee.Members) - 1) //nolint:gosec
selectedCommitteeMember = rand.Intn(len(committee.Members)) //nolint:gosec
}
}
d.selectedCommitteeMember = selectedCommitteeMember
Expand Down

0 comments on commit c0ba17e

Please sign in to comment.