anchor.diff:  % @doc Filter one element from a set of nodes. Do it in a way that filters such a node
   % that the resulting routing table is the best one under all _possible_ routing tables.
   -spec entry_filtering(rt(),[rt_entry()]) -> rt().
  -entry_filtering(RT, []) -> RT;
  -entry_filtering(RT, AllowedNodes) ->
  +entry_filtering(RT, []) -> RT; % only sticky entries and the source node given; nothing to do
  +entry_filtering(RT, [_|_] = AllowedNodes) ->
       % XXX ensure that the allowed nodes are actually contained in the routing table
       false = lists:any(fun(none) -> true; (_) -> false end,
               [rt_lookup_node(entry_nodeid(N), RT) || N
                   <- AllowedNodes]),
  +
       Spacings = [
           begin PredNode = predecessor_node(RT,Node),
                 {Node, spacing(Node, RT) + spacing(PredNode, RT)}
  
positive.code:             end,
              % update failure detector:
              case ReportToFD of
                  true -> NewPids = to_pid_list(NewRT),
                          OldPids = to_pid_list(OldRT),
                          fd:update_subscriptions(OldPids, NewPids);
                  _ -> ok
              end
      end
      .
  %% userdevguide-end rt_frtchord:check
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code:     LocalRT = rt_loop:get_rt(State),
      NewRT = case LocalRT =/= RT of
          true ->
              % - add each entry from the other RT if it doesn't already exist
              % - entries to be added have to be normal entries as RM invokes adding sticky
              % nodes
              util:gb_trees_foldl(
                  fun(Key, Entry, Acc) ->
                          %% TODO send an async message to check if entry is valid; if it
                          %isn't, delete it later
                          case entry_exists(Key, Acc) of
                              true -> Acc;
                              false -> add_normal_entry(rt_entry_node(Entry), Acc)
                          end
                  end,
                  LocalRT, get_rt_tree(RT)
              )
              ;
  
          false -> LocalRT
      end,
      update_fd(LocalRT, NewRT),
      rt_loop:set_rt(State, NewRT)
      ;
  
  