anchor.diff:                                   internal_join(N, S)
                            end, State1, JoiningNodes),
   
  -    {reply, ok, State2};
  +    {reply, ok, State2#state{pending=Pending1}};
   
   handle_call({leave, Node}, From, State0) ->
       %% Perform leave.
  
positive.code:             Open =:= Required;
          _ ->
              false
      end.
negative.code:     DownFunctions = dict:append(Name, Function, DownFunctions0),
      {reply, ok, State#state{down_functions=DownFunctions}};
  
  handle_call({update_members, Nodes}, _From, #state{pending=Pending,
                                                     membership=Membership}=State) ->
      % lager:info("Updating membership with: ~p", [Nodes]),
  
      %% Get the current membership.
      CurrentMembership = [N || #{name := N} <- sets:to_list(?SET:query(Membership))],
      % lager:info("CurrentMembership: ~p", [CurrentMembership]),
  
      %% Compute leaving list.
      Pending1 = lists:filter(fun(N) ->
                                      lists:member(N, Nodes)
                              end, Pending),
  
      %% Compute leaving list.
      LeavingNodes = lists:filter(fun(N) ->
  