anchor.diff:  %%------------------------------------------`--------------------------
   -spec init([node()]) -> ok.
   init([Node]) ->
  -    set_chash_ring(#ring{type = single_node, chash = Node});
  +    set_chash_ring(#ring{type = single_node, chash = Node, nodes_num = 1});
   init(Nodes) ->
       case get_chash_ring() of
           undefined ->
  +            NodesNum = length(Nodes),
               [Node0 | _] = Nodes,
  -            InitialCHash = chash:fresh(length(Nodes), Node0),
  +            InitialCHash = chash:fresh(NodesNum, Node0),
               CHash = lists:foldl(fun({I, Node}, CHashAcc) ->
                   chash:update(get_nth_index(I, CHashAcc), Node, CHashAcc)
               end, InitialCHash, lists:zip(lists:seq(1, length(Nodes)), Nodes)),
               KeyConnectedNodes = ctool:get_env(key_connected_nodes, 1),
  -            Ring = #ring{type = multi_node, chash = CHash, key_connected_nodes = KeyConnectedNodes},
  +            Ring = #ring{type = multi_node, chash = CHash,
  +                key_connected_nodes = KeyConnectedNodes, nodes_num = NodesNum},
               set_chash_ring(Ring);
           _ ->
               ok
  
positive.code:     type :: single_node | multi_node | broken,
      chash :: chash:chash() | node(),
      broken_nodes = [] :: [node()],
      key_connected_nodes = 1 :: pos_integer()
  }).
  
  -type ring() :: #ring{}.
  
  %% API
  -export([init/1, cleanup/0, get_chash_ring/0, set_chash_ring/1,
      set_broken_node/1, set_fixed_node/1, set_key_connected_nodes/1,
      get_node/1, get_nodes/2, get_all_nodes/0]).
  
  %%%===================================================================
  
negative.code: %%--------------------------------------------------------------------
  %% @doc
  %% Get nodes that are responsible for the data labeled with given term.
  %% Returns three lists: alvie connected nodes, other alive nodes and broken nodes.
  %% Sum of lists' length is equal to requested nodes' count.
  %% @end
  %%--------------------------------------------------------------------
  -spec get_nodes(term(), non_neg_integer() | all) ->
      {KeyConnectedNodes :: [node()], OtherRequestedNodes :: [node()], BrokenNodes :: [node()]}.
  get_nodes(Label, RequestedNodesNum0) ->
      case get_chash_ring() of
          undefined ->
              error(chash_ring_not_initialized);
          #ring{type = single_node, chash = Node} ->
              {[Node], [], []};
          #ring{type = multi_node, chash = CHash, key_connected_nodes = KeyConnectedNodesNum} = Ring ->
              Index = chash:key_of(Label),
              RequestedNodesNum = get_requested_nodes_num(RequestedNodesNum0, Ring),
              Nodes = lists:map(fun({_, Node}) -> Node end,
                      chash:successors(Index, CHash, max(KeyConnectedNodesNum, RequestedNodesNum))),
              {KeyConnectedNodes, OtherRequestedNodes} = lists:split(min(KeyConnectedNodesNum, length(Nodes)), Nodes),
              {KeyConnectedNodes, OtherRequestedNodes, []};
          #ring{type = broken, chash = CHash, broken_nodes = BrokenNodes,
              key_connected_nodes = KeyConnectedNodesNum}  = Ring ->
              Index = chash:key_of(Label),
              RequestedNodesNum = get_requested_nodes_num(RequestedNodesNum0, Ring),
              Nodes = chash:successors(Index, CHash, max(KeyConnectedNodesNum, RequestedNodesNum)),
              {KeyConnectedNodes, OtherRequestedNodes} = lists:split(min(KeyConnectedNodesNum, length(Nodes)), Nodes),
              {AliveKeyConnectedNodes, BrokenKeyConnectedNodes} = filter_nodes(KeyConnectedNodes, BrokenNodes),
              {AliveOtherRequestedNodes, BrokenOtherRequestedNodes} = filter_nodes(OtherRequestedNodes, BrokenNodes),
  