       [] -> :nothingtodo
       [n] ->
         case MapSet.member?(ring.up_set, n) do
-          false -> :nothingtodo
-          true ->
+          true -> :nothingtodo
+          false ->
             # TODO add this info in the gossip to speedup the convergence of UPs
             Node.monitor(n, true)
         end

  end

  defp gen_ring(set, up, payload, counter, callback) do
    %GenServerring{node_set: set, up_set: up, payload: payload,
      counter: counter, callback: callback}
  end

  defp get_ring(server), do: GenServer.call(server, :get_ring)

  defp update_payload(ring, payload) do
    {ring, _} =

    if not contain?(node_set, node()) do
      :erlang.send_after(5_000, self(), :halt_node)
    end
    case up_nodes(ring) |> MapSet.delete(node()) |> MapSet.to_list do
      [] -> {:noreply, ring}
      active_nodes ->
        {:registered_name, name} = Process.info(self(), :registered_name)
        random_node =
          Enum.at(active_nodes, :random.uniform(length(active_nodes)) - 1)
        GenServer.cast(
          {name, random_node},
          {:reconcile,
            %{node_set: node_set,
              forced_down: ring.forced_down,
              payload: ring.payload,
              from_node: [node()]}})
      {:noreply, ring}
    end
  end
