anchor.diff:  %% This function removes sticky nodes from the RT which aren't in the neighborhood
   %% anymore. Additionally, it pings all entries to make sure that the IDs of the entries
   %% haven't changed.
  -%% TODO do we delete living sticky entries here?
  --spec remove_and_ping_entries(OldStickyNodes :: set(),
  -                              NewNeighbors :: nodelist:neighborhood(),
  +-spec remove_and_ping_entries(NewNeighbors :: nodelist:neighborhood(),
                                 RT :: rt()) -> rt().
  -remove_and_ping_entries(OldStickyNodes, NewNeighbors, RT) ->
  +remove_and_ping_entries(NewNeighbors, RT) ->
  +    OldStickyNodes = sets:from_list(lists:map(fun rt_entry_node/1,
  +            get_sticky_entries(RT))),
       NewStickyNodes = get_node_neighbors(NewNeighbors),
       DeadStickyNodes = sets:subtract(OldStickyNodes, NewStickyNodes),
  -    DeadStickyNodesIds = util:sets_map(fun entry_nodeid/1, DeadStickyNodes),
  -    % filter dead nodes
  +    DeadStickyNodesIds = util:sets_map(fun node:id/1, DeadStickyNodes),
  +    ToBeAddedNodes = sets:subtract(NewStickyNodes, OldStickyNodes),
  +    % filter dead nodes and add sticky nodes
       FilteredRT = lists:foldl(fun entry_delete/2, RT, DeadStickyNodesIds),
  -    % add new sticky nodes
  -    NewRT = sets:fold(fun add_sticky_entry/2, FilteredRT, NewStickyNodes),
  +    NewRT = sets:fold(fun add_sticky_entry/2, FilteredRT, ToBeAddedNodes),
       %% TODO ping entries
       NewRT.
   
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  %% userdevguide-begin rt_frtchord:empty
  %% @doc Creates an "empty" routing table containing the successor.
  -spec empty(nodelist:neighborhood()) -> rt().
  empty(Neighbors) ->
      RT = add_source_entry(nodelist:node(Neighbors), #rt_t{}),
      Preds = nodelist:preds(Neighbors),
      Succs = nodelist:succs(Neighbors),
  
      % coyping the preds and succs silences dialyzer
      StickyPreds = [N || N <- Preds],
      StickySuccs = [N || N <- Succs],
  
      % insert preds and succs as sticky entries to the routing table
      % TODO We should always be able to add sticky nodes -> don't check the RT size
      TmpRT = lists:foldl(fun add_sticky_entry/2, RT, StickyPreds),
      lists:foldl(fun add_sticky_entry/2, TmpRT, StickySuccs)
      .
  %% userdevguide-end rt_frtchord:empty
  
  
negative.code:     SizeOfRT = get_size(IntermediateRT),
      MaxEntries = maximum_entries(),
      if SizeOfRT >= MaxEntries ->
              AllowedNodes = [N || N <- gb_trees:values(get_rt_tree(RT)),
                  not is_sticky(N) and not is_source(N)],
              entry_filtering(IntermediateRT, AllowedNodes);
         true -> IntermediateRT
      end.
  
  