anchor.diff:  -include("scalaris.hrl").
   
   % exports for unit tests
  --export([check_rt_integrity/1
  -        , check_well_connectedness/1
  -        , get_random_key_from_generator/3
  -    ]).
  +-export([check_rt_integrity/1,
  +         check_well_connectedness/1,
  +         get_random_key_from_generator/3
  +        ]).
   
   % Make dialyzer stop complaining about unused functions
   % The following functions are only used when ?RT == rt_frtchord. Dialyzer should not
  
positive.code: 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
      .
  
  % Get the tuple of adjacent finger ids with Node being in the middle:
  % {Predecessor, Node, Successor}
  
negative.code: 
      rt_loop:set_rt(State, NewRT)
      ;
  
  handle_custom_message({send_rt, From}, State) ->
      comm:send_local(From, {send_rt_response, rt_loop:get_rt(State)}),
      State;
  
  handle_custom_message(_Message, _State) -> unknown_event.
  %% userdevguide-end rt_frtchord:handle_custom_message
  