anchor.diff:  init([TorrentID, ChunkSize, FetchedPieces, PieceSizes, InitTorrentPid]) ->
       etorrent_scarcity:await_scarcity_server(TorrentID),
       true = register_chunk_server(TorrentID),
  -    Pending = etorrent_pending:originhandle(),
  +    Pending = etorrent_pending:originhandle(TorrentID),
   
       NumPieces = length(PieceSizes),
       PiecesValid = etorrent_pieceset:from_list(FetchedPieces, NumPieces),
  
positive.code:     {ok, NewRef, NewList} = etorrent_scarcity:watch(TorrentID, Tag, Pieceset),
      #pieceprio{ref=NewRef, tag=Tag, pieces=NewList}.
  
  %%
  %% Given a tree of a peers currently open requests, return a list of
  %% tuples containing the piece index, offset and length of each request.
  %%
  -spec chunk_list(gb_tree()) -> [{pos_integer(), pos_integer(), pos_integer()}].
  chunk_list(OpenReqs) ->
      [{I,O,L} || {{I,O},L} <- gb_trees:to_list(OpenReqs)].
  
  
  -ifdef(TEST).
  -define(chunk_server, ?MODULE).
  -define(scarcity, etorrent_scarcity).
  -define(timer, etorrent_timer).
  
  
  chunk_server_test_() ->
  
negative.code:     pieces :: [pos_integer()]}).
  
  -record(state, {
      torrent_id  :: pos_integer(),
      torrent_pid :: pid(),
      chunk_size  :: pos_integer(),
      %% Piece state sets
      pieces_valid      :: pieceset(),
      pieces_unassigned :: pieceset(),
  