anchor.diff:                 connections=Connections0,
                  recv_message_map=RecvMessageMap0}=State0) ->
       %% Select random peer from passive view, and attempt to connect it.
  -    Random = select_random(Passive0, [Myself0]),
  -
  -    lager:info("Node ~p sends the NEIGHBOR_REQUEST to ~p", [Myself0, Random]),
  -
  -    %% Trigger connection.
  -    Connections = maybe_connect(Random, Connections0),
  -
  -    LastDisconnectId = get_current_id(Random, RecvMessageMap0),
  -    do_send_message(
  -        Random,
  -        {neighbor_request, Myself0, high, Tag0, LastDisconnectId},
  -        Connections),
  -
  -    State0#state{connections=Connections}.
  +    case select_random(Passive0, [Myself0]) of
  +        undefined ->
  +            State0;
  +        Random ->
  +            lager:info("Node ~p sends the NEIGHBOR_REQUEST to ~p", [Myself0, Random]),
  +
  +            %% Trigger connection.
  +            Connections = maybe_connect(Random, Connections0),
  +
  +            LastDisconnectId = get_current_id(Random, RecvMessageMap0),
  +            do_send_message(
  +                Random,
  +                {neighbor_request, Myself0, high, Tag0, LastDisconnectId},
  +                Connections),
  +
  +            State0#state{connections=Connections}
  +    end.
  +
  +%% @private
  +schedule_random_promotion() ->
  +    erlang:send_after(?RANDOM_PROMOTION_INTERVAL,
  +                      ?MODULE,
  +                      random_promotion).
  
positive.code: handle_info({'EXIT', From, _Reason},
              #state{active=Active0,
                     passive=Passive0,
                     connections=Connections0}=State) ->
      %% Prune active connections from dictionary.
      FoldFun = fun(K, V, {Peer, AccIn}) ->
                        case V =:= From of
  
negative.code: -behaviour(partisan_peer_service_manager).
  
  -define(PASSIVE_VIEW_MAINTENANCE_INTERVAL, 10000).
  -define(RANDOM_PROMOTION_INTERVAL, 5000).
  
  -include("partisan.hrl").
  
  