anchor.diff:                  ok ->
                       timer:sleep(timer:seconds(2)),
                       Batches = get_stashed_batches(ProviderId, SpaceId),
  -%%                    Batches = case state_get({stash, ProviderId, SpaceId}) of
  -%%                                  undefined ->
  -%%                                      #{};
  -%%                                  Map ->
  -%%                                      Map
  -%%                              end,
                       SortedKeys = lists:sort(maps:keys(Batches)),
                       Stashed = lists:foldl(fun(S, Acc) ->
                           case Acc + 1 >= S of
  
positive.code:     ok;
  consume_batches(ProviderId, SpaceId, CurrentUntil, NewBranchSince, NewBranchUntil) ->
      Batches = get_stashed_batches(ProviderId, SpaceId),
  %%    Batches = case state_get({stash, ProviderId, SpaceId}) of
  %%                  undefined ->
  %%                      #{};
  %%                  Map ->
  %%                      Map
  %%              end,
      SortedKeys = lists:sort(maps:keys(Batches)),
  
      % check if we have all needed changes to start batches application
  
negative.code:             end
          end),
      ok.
  
  
  %%--------------------------------------------------------------------
  %% @doc
  