Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Possibly skipping first peer when randomly selecting #434

Open
antonyscerri opened this issue May 13, 2022 · 0 comments
Open

Possibly skipping first peer when randomly selecting #434

antonyscerri opened this issue May 13, 2022 · 0 comments

Comments

@antonyscerri
Copy link

Hi

New to erlang so excuse me if I have misinterpreted this.

This line and the subsequent few look like it may be skipping the first peer in the list (when there is more than one).

https://github.com/helium/erlang-libp2p/blob/master/src/peerbook/libp2p_peerbook.erl#L229

If uniform picks from 1 to N inclusive and is then added to the start position it means it can never begin with that initial point.

Thanks

Tony

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant