anchor.diff:  %% @private
   %% @doc Send an heartbeat to a list of nodes, except this one.
   send_heartbeat(Nodes, StateName, StateData) ->
  -    NodeInfo = node_info(StateData),
  +    NodeInfo = node_info(),
   
       Args = {heartbeat, NodeInfo, StateName,
               [{peers, StateData#state.peers},
  
positive.code: %% Convert node info to node.
  -spec node_info_to_node(node_info()) -> node().
  node_info_to_node({_Version, Node}) ->
      Node;
  node_info_to_node(Node) ->
      Node.
  
  %% Determine whether some node is of higher priority than ourselves.
  -spec higher_priority_node(node_info(), #state{}) -> boolean().
  higher_priority_node(NodeInfo, #state{mode=Mode} = StateData) ->
      Self = node_info(StateData),
      higher_priority_node(Self, NodeInfo, Mode).
  
  -spec higher_priority_node(node_info(), node_info(), operation_mode()) ->
                                    boolean().
  higher_priority_node(Self, NodeInfo, Mode) ->
      Node = node_info_to_node(NodeInfo),
  
      case Mode =:= normal andalso not is_atom(NodeInfo) of
          true ->
              {SelfVersion, SelfNode} = Self,
              {Version, _} = NodeInfo,
  
              if
                  Version > SelfVersion ->
                      true;
                  Version =:= SelfVersion ->
                      Node < SelfNode;
                  true ->
                      false
              end;
          false ->
              case is_atom(NodeInfo) of
                  false ->
                      ?log_warning("Got new-style heartbeat from ~p "
                                   "node when in compatible mode", [Node]);
                  true ->
                      ok
              end,
              Node < node_info_to_node(Self)
      end.
  
  -ifdef(EUNIT).
  
  priority_test() ->
      ?assertEqual(true,
                   higher_priority_node('ns_2@192.168.1.1',
                                        'ns_1@192.168.1.1',
                                        compatible)),
  
      ?assertEqual(false,
                   higher_priority_node({misc:parse_version("1.7.1"),
                                         'ns_1@192.168.1.1'},
                                        'ns_2@192.168.1.1',
                                        normal)),
      ?assertEqual(true,
                   higher_priority_node({misc:parse_version("1.7.1"),
                                         'ns_2@192.168.1.1'},
                                        'ns_1@192.168.1.1',
                                        normal)),
  
      ?assertEqual(true,
                   higher_priority_node({misc:parse_version("1.7.1"),
                                         'ns_1@192.168.1.1'},
                                        {misc:parse_version("2.0"),
                                         'ns_2@192.168.1.1'},
                                        normal)),
      ?assertEqual(true,
                   higher_priority_node({misc:parse_version("1.7.1"),
                                         'ns_2@192.168.1.1'},
                                        {misc:parse_version("2.0"),
                                         'ns_1@192.168.1.1'},
                                        normal)),
      ?assertEqual(false,
                   higher_priority_node({misc:parse_version("2.0"),
                                         'ns_1@192.168.1.1'},
                                        {misc:parse_version("1.7.2"),
                                         'ns_0@192.168.1.1'},
                                        normal)),
      ?assertEqual(true,
                   higher_priority_node({misc:parse_version("2.0"),
                                         'ns_2@192.168.1.1'},
                                        {misc:parse_version("2.0"),
                                         'ns_1@192.168.1.1'},
                                        normal)).
  
  -endif.
  
negative.code:             ?log_warning("Skipped ~p heartbeats~n", [Eaten])
      end,
  
      Node = node(),
  
      %% Make sure our name hasn't changed
      StateData1 = case StateData#state.master of
                       Node ->
                           StateData;
                       N1 ->
                           ?log_info("Node changed name from ~p to ~p. "
                                     "Updating state.", [N1, Node]),
                           StateData#state{master=node()}
                   end,
      send_heartbeat(ns_node_disco:nodes_wanted(), master, StateData1),
  