anchor.diff:      % only learn; the RT must be empty, so there is no filtering needed afterwards
       NewRT = entry_learning(Entry, source, IntermediateRT),
       add_fd(NewRT),
  -    NewRT
  -    .
  +    NewRT.
   
   % @doc Add a normal entry to the routing table
   -spec add_normal_entry(Entry :: node:node_type(), rt()) -> rt().
   add_normal_entry(Entry, RT) ->
  -    add_entry(Entry, normal, RT)
  -    .
  +    add_entry(Entry, normal, RT).
   
   % @doc Get the inner node:node_type() of a rt_entry
   -spec rt_entry_node(N :: rt_entry()) -> node:node_type().
  
positive.code:     Node = #rt_entry{type=sticky} = rt_get_node(EntryKey, RT),
      NewNode = Node#rt_entry{type=normal},
      UpdatedTree = gb_trees:enter(EntryKey, NewNode, get_rt_tree(RT)),
      RT#rt_t{nodes=UpdatedTree}
      .
  
  % @doc Create an rt_entry and return the entry together with the Pred und Succ node, where
  % the adjacent fingers are changed for each node.
  -spec create_entry(Node :: node:node_type(), Type :: entry_type(), RT :: rt()) ->
      {rt_entry(), rt_entry(), rt_entry()}.
  create_entry(Node, Type, RT) ->
      NodeId = node:id(Node),
      Tree = get_rt_tree(RT),
      % search the adjacent fingers using the routing table
      PredLookup = util:gb_trees_largest_smaller_than(NodeId, Tree),
      RTSize = get_size(RT),
      case PredLookup of
          nil when RTSize =:= 0 -> % this is the first entry of the RT
              NewEntry = rt_entry_from(Node, Type, NodeId, NodeId),
              {NewEntry, NewEntry, NewEntry}
              ;
          nil -> % largest finger
              {_PredId, Pred} = gb_trees:largest(Tree),
              get_adjacent_fingers_from(Pred, Node, Type, RT)
              ;
          {value, _PredId, Pred} ->
              get_adjacent_fingers_from(Pred, Node, Type, RT)
      end
      .
  
  rt_entry_from(Node, Type, PredId, SuccId) ->
      #rt_entry{
          node=Node
  
negative.code:     end
      .
  
  %% @doc Filter the source node's pid from a list of pids.
  -spec filter_source_pid(RT :: rt(), ListOfPids :: [pid()]) -> [pid()].
  filter_source_pid(RT,ListOfPids) ->
      SourcePid = node:pidX(rt_entry_node(get_source_node(RT))),
      [P || P <- ListOfPids, P =/= SourcePid].
  
  %% @doc Set up a set of subscriptions from a routing table
  -spec add_fd(RT :: rt())  -> ok.
  add_fd(#rt_t{} = RT) ->
      NewPids = to_pid_list(RT),
      % Filter the source node from the Pids, as we don't need an FD for that node. If the
      % source node crashes (which is the process calling this function), we are done
      % for.
      fd:subscribe(filter_source_pid(RT, NewPids)).
  
  %% @doc Update subscriptions
  -spec update_fd(OldRT :: rt(), NewRT :: rt()) -> ok.
  update_fd(OldRT, OldRT) -> ok;
  update_fd(#rt_t{} = OldRT, #rt_t{} = NewRT) ->
      OldPids = filter_source_pid(OldRT, to_pid_list(OldRT)),
      NewPids = filter_source_pid(NewRT, to_pid_list(NewRT)),
      fd:update_subscriptions(OldPids, NewPids).
  
  %% userdevguide-end rt_frtchord:check
  