anchor.diff:                                             cost_precision = CostPrecision,
                                              log_reconnect = LogReconnect}}}, _,
               #state{node_name = NodeName,
  -                   nodes_alive = NodesAliveOld,
                      nodes_state = NodesStateOld,
                      nodes_down_durations = NodesDownDurationsOld,
                      listen = ListenOld,
  
positive.code:      NodesAll,
       NodesState,
       NodesDownDurations} = reconfigure_nodes(NodeName,
                                               NodesAliveOld,
                                               Nodes,
                                               NodesStateOld,
                                               NodesDownDurationsOld,
  
negative.code:     monitor_nodes(true, ListenNew),
      monitor_nodes(false, ListenOld).
  
  reconfigure_nodes(NodeName, Nodes,
                    NodesStateOld, NodesDownDurationsOld, Listen) ->
      ListenNodes = cloudi_x_cpg:listen_nodes(Listen, NodeName),
      NodesAll = lists:usort(ListenNodes ++ Nodes),
      NodesDead = reconfigure_nodes_dead(ListenNodes, NodesAll),
      NodesAlive = reconfigure_nodes_alive(NodesDead, NodesAll),
      NodesState = maps:with([node() | NodesAll], NodesStateOld),
      NodesDownDurations = cloudi_core_i_status:
                           durations_copy(NodesAll, NodesDownDurationsOld),
      {NodesAlive, NodesDead, NodesAll, NodesState, NodesDownDurations}.
  
  reconfigure_nodes_dead([], Nodes) ->
      Nodes;
  reconfigure_nodes_dead([NodeAlive | NodesAlive], Nodes) ->
      reconfigure_nodes_dead(NodesAlive, lists:delete(NodeAlive, Nodes)).
  
  reconfigure_nodes_alive([], Nodes) ->
      Nodes;
  