anchor.diff:              {NewEntry, NewEntry, NewEntry}
               ;
           nil -> % largest finger
  -            {PredId, Pred} = gb_trees:largest(Tree),
  -            get_adjacent_fingers_from(PredId, Pred, Node, Type, RT)
  +            {_PredId, Pred} = gb_trees:largest(Tree),
  +            get_adjacent_fingers_from(Pred, Node, Type, RT)
               ;
  -        {value, PredId, Pred} ->
  -            get_adjacent_fingers_from(PredId, 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}
  -get_adjacent_fingers_from(PredId, Pred, Node, Type, RT) ->
  +-spec get_adjacent_fingers_from(Pred::rt_entry(), Node::node:node_type(),
  +    Type::entry_type(), RT::rt()) -> {rt_entry(), rt_entry(), rt_entry()}.
  +get_adjacent_fingers_from(Pred, Node, Type, RT) ->
  +    PredId = entry_nodeid(Pred),
       Succ = successor_node(RT, Pred),
       SuccId = entry_nodeid(Succ),
       NodeId = node:id(Node),
  -    % construct the node
       NewEntry = #rt_entry{
           node=Node,
           type=Type,
  -        adjacent_fingers={PredId, entry_nodeid(Succ)}
  +        adjacent_fingers={PredId, SuccId}
       },
       case PredId =:= SuccId of
  -        false -> {set_adjacent_succ(Pred, NodeId),
  +        false ->
  +            {set_adjacent_succ(Pred, NodeId),
                   NewEntry,
                   set_adjacent_pred(Succ, NodeId)
               };
  -        true -> {set_adjacent_fingers(Pred, NodeId, NodeId),
  -                NewEntry,
  -                set_adjacent_fingers(Succ, NodeId, NodeId)
  -            }
  +        true ->
  +            AdjacentNode = set_adjacent_fingers(Pred, NodeId, NodeId),
  +            {AdjacentNode, NewEntry, AdjacentNode}
       end
       .
   
  
positive.code: % @doc Get the source node of a routing table
  -spec get_source_node(RT :: rt()) -> rt_entry().
  get_source_node(#rt_t{source=undefined}) -> erlang:error("routing table source unknown");
  get_source_node(#rt_t{source=NodeId, nodes=Nodes}) -> gb_trees:get(NodeId, Nodes).
  
  % @doc Set the source node of a routing table
  -spec set_source_node(SourceId :: key(), RT :: rt()) -> rt().
  
negative.code: 
  % exports for unit tests
  -export([check_rt_integrity/1
          , check_well_connectedness/1
          , get_random_key_from_generator/3
      ]).
  
  