anchor.diff:      is_in_passive_view(Peer, Passive) andalso is_not_empty(Suspected).
   
   %% @private
  -perform_join(Peer, Tag,
  +perform_join(Peer, Tag, PeerEpoch,
                #state{myself=Myself,
                       active=Active0,
                       pending=Pending,
                       suspected=Suspected0,
  -                    connections=Connections0}=State0) ->
  -    %% Add to active view.
  -    State = #state{active=Active} = add_to_active_view(Peer, Tag, State0),
  -
  -    %% Establish connections.
  -    Connections = establish_connections(Pending,
  -                                        Active,
  -                                        Connections0),
  -
  -    %% Send neighbor_accepted message to origin, that will
  -    %% update it's view.
  -    %%
  -    do_send_message(Peer,
  -                    {neighbor, Myself, Tag, Peer},
  -                    Connections),
  -
  -    %% Notify with event.
  -    notify(State),
  -
  -    %% Remove from suspected.
  -    Suspected = remove_from_suspected(Peer, Suspected0),
  -
  -    %% Random walk for forward join.
  -    Peers = members(Active0) -- [Myself],
  -
  -    lists:foreach(fun(P) ->
  -                do_send_message(P,
  -                                {forward_join, Peer, Tag, arwl(), Myself},
  -                                Connections)
  -        end, Peers),
  -
  -    %% Return.
  -    State#state{suspected=Suspected}.
  +                    connections=Connections0,
  +                    sent_message_map=SentMessageMap,
  +                    ack_message_map=AckMessageMap}=State0) ->
  +    case is_addable(PeerEpoch, Peer, SentMessageMap) of
  +        true ->
  +            %% Add to active view.
  +            State = #state{active=Active} = add_to_active_view(Peer, Tag, State0),
  +
  +            %% Establish connections.
  +            Connections = establish_connections(Pending,
  +                                                Active,
  +                                                Connections0),
  +
  +            LastDisconnectId = get_current_id(Peer, AckMessageMap),
  +            %% Send neighbor_accepted message to origin, that will
  +            %% update it's view.
  +            do_send_message(Peer,
  +                            {neighbor, Myself, Tag, LastDisconnectId, Peer},
  +                            Connections),
  +
  +            %% Notify with event.
  +            notify(State),
  +
  +            %% Remove from suspected.
  +            Suspected = remove_from_suspected(Peer, Suspected0),
  +
  +            %% Random walk for forward join.
  +            Peers = members(Active0) -- [Myself],
  +
  +            lists:foreach(
  +              fun(P) ->
  +                      do_send_message(
  +                        P,
  +                        {forward_join, Peer, Tag, PeerEpoch, arwl(), Myself},
  +                        Connections)
  +              end, Peers),
  +
  +            %% Return.
  +            State#state{suspected=Suspected};
  +        false ->
  +            State0
  +    end.
   
   %% @private
   send_neighbor_request(Peer, #state{myself=Myself,
                                      active=Active0,
                                      tag=Tag,
  -                                   connections=Connections}=State) ->
  +                                   connections=Connections,
  +                                   ack_message_map=AckMessageMap}=State) ->
       Priority = case sets:size(Active0) of
           0 ->
               high;
  
positive.code:             %% No more peers are suspected; no change.
              State0;
          Random ->
              %% Remove from suspected.
              Suspected = remove_from_suspected(Random, Suspected0),
  
              %% Remove from reserved.
              Reserved = remove_from_reserved(Random, Reserved0),
  
              %% Remove from active view.
              Active = remove_from_active_view(Random, Active0),
  
              %% Add to passive.
              State1 = add_to_passive_view(
                         Random, State0#state{suspected=Suspected,
                                              reserved=Reserved,
                                              active=Active}),
  
              %% Add to active view.
              add_to_active_view(Peer, Tag, State1)
      end,
  
      %% Notify with event.
  
negative.code: %%%===================================================================
  
  %% @private
  handle_message({disconnect, Peer, DisconnectId},
                 #state{myself=Myself,
                        active=Active0,
                        ack_message_map=AckMessageMap0}=State0) ->
      lager:info("Node ~p received disconnect from ~p with ~p",
                 [Myself, Peer, DisconnectId]),
  
      case is_valid_disconnect(Peer, DisconnectId, AckMessageMap0) of
          false ->
              %% Ignore the older disconnect message.
              {reply, ok, State0};
          true ->
              %% Remove from active
              Active = sets:del_element(Peer, Active0),
              lager:info("Node ~p active view: ~p", [Myself, sets:to_list(Active)]),
  
              %% Add to passive view.
              State = add_to_passive_view(Peer,
                                          State0#state{active=Active}),
  
              %% Update the AckMessageMap.
              AckMessageMap = dict:store(Peer, DisconnectId, AckMessageMap0),
  
              {reply, ok, State#state{ack_message_map=AckMessageMap}}
      end;
  
  handle_message({neighbor, Peer, Tag, DisconnectId, _Sender},
                 #state{sent_message_map=SentMessageMap}=State0) ->
      % lager:info("Neighboring with ~p from random walk.", [Peer]),
  
      State = case is_addable(DisconnectId, Peer, SentMessageMap) of
                  true ->
                      %% Add node into the active view.
                      add_to_active_view(Peer, Tag, State0);
                  false ->
                      %% @todo Need to send the disconnect message here?
                      State0
              end,
  
      %% Notify with event.
      notify(State),
  