Skip to content

Commit

Permalink
- Peer list testing infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
samcamwilliams committed Dec 12, 2017
1 parent aa122dc commit 1432460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ar_gossip.erl
Expand Up @@ -23,6 +23,7 @@ init(MaxDelayMS) when is_integer(MaxDelayMS) ->
add_peers(S, []) -> S;
add_peers(S, [Peer|Peers]) when self() == Peer -> add_peers(S, Peers);
add_peers(S, [Peer|Peers]) ->
ar:report_console([{adding_peer, Peer}, {node, self()}]),
case lists:member(Peer, S#gs_state.peers) of
false -> add_peers(S#gs_state { peers = [Peer|S#gs_state.peers] }, Peers);
true -> add_peers(S, Peers)
Expand Down
1 change: 1 addition & 0 deletions src/ar_util.erl
Expand Up @@ -135,6 +135,7 @@ dehexify([X,Y|T], Acc) ->
dehexify(T, [V | Acc]).

%% @doc Parse a string representing a remote host into our internal format.
parse_peer("") -> throw(empty_peer_string);
parse_peer(BitStr) when is_bitstring(BitStr) ->
parse_peer(bitstring_to_list(BitStr));
parse_peer(Str) when is_list(Str) ->
Expand Down

0 comments on commit 1432460

Please sign in to comment.