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

Possibly skipping first peer when randomly selecting #434

@antonyscerri

Description

@antonyscerri

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

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