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: 
  -spec successor_node(RT :: rt(), Node :: rt_entry()) -> rt_entry().
  successor_node(RT, Node) ->
      gb_trees:get(adjacent_succ(Node), get_rt_tree(RT)).
  
  -spec spacing(Node :: rt_entry(), RT :: rt()) -> float().
  spacing(Node, RT) ->
  
negative.code:     %% merge the routing tables. Note: We don't care if this message is not from our
      %current successor. We just have to make sure that the merged entries are valid.
      LocalRT = rt_loop:get_rt(State),
      NewRT = case LocalRT =/= RT of
          true ->
              % Merge the smaller table into the bigger one
              % - add each entry from the other RT if it doesn't already exist
              % - entries to be added have to be normal entries
              {From, To} = case get_size(RT) < get_size(LocalRT) of
                  true -> {RT, LocalRT};
                  false -> {LocalRT, RT}
              end,
              util:gb_trees_foldl(
                  fun(Key, Entry, Acc) ->
                          %% TODO send an async message to check if entry is valid; if it
  