anchor.diff:          StatsPerTransfer#{TransferId => NewTransferStats}
       end, State#state.cached_stats, TransferIds),
   
  +    NewCachedBlocks = lists:foldl(fun(From, Acc) ->
  +        FromBlocks = maps:get(From, Acc, []),
  +        maps:put(From, [Block | FromBlocks], Acc)
  +    end, State#state.cached_blocks, AffectedFroms),
  +
       NewState = State#state{
           cached_stats = UpdatedStats,
  -        cached_blocks = [Block | State#state.cached_blocks]
  +        cached_blocks = NewCachedBlocks
       },
       set_caching_timers(NewState).
   
  
positive.code:         [] -> [undefined];
          Values -> Values
      end,
      {noreply, cache_stats_and_blocks(TransferIds, ProviderId, Block, State), ?DIE_AFTER};
  
  handle_info(?FLUSH_STATS, State) ->
      {noreply, flush_stats(State, true), ?DIE_AFTER};
  
  handle_info(?FLUSH_BLOCKS, State) ->
      {_, State2} = flush_blocks(State, []),
      {noreply, State2, ?DIE_AFTER};
  
  handle_info(?FLUSH_EVENTS, State) ->
      {noreply, flush_events(State), ?DIE_AFTER};
  
negative.code:     end,
      TransferIds = maps:with(FinishedFroms, FromToTransferId),
      [transfer:increase_files_transferred_counter(TID) || TID <- maps:values(TransferIds)],
      [gen_server2:reply(From, {ok, maps:get(From, AnsMap)}) || From <- FinishedFroms],
      {noreply, State3#state{from_sessions = FS2}, ?DIE_AFTER};
  
  handle_info({FailedRef, complete, {error, disconnected}}, State) ->
  