Skip to content

Commit

Permalink
Update network/p2p/validators.go
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Joshua Kim <[email protected]>
  • Loading branch information
joshua-kim and StephenButtolph authored Nov 29, 2023
1 parent 741f612 commit bfa0638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network/p2p/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func (v *Validators) Sample(ctx context.Context, limit int) []ids.NodeID {

v.refresh(ctx)

sampled := make([]ids.NodeID, 0, limit)
validatorIDs := v.validatorIDs.Sample(limit)
sampled := validatorIDs[:0]

for _, validatorID := range validatorIDs {
if !v.peers.has(validatorID) {
Expand Down

0 comments on commit bfa0638

Please sign in to comment.