anchor.diff:      end.
   
   %% Check the piece Idx on torrent Id for completion
  -check_piece(Id, Idx) ->
  +check_piece(_, Id, Idx) ->
       _ = spawn_link(etorrent_io, check_piece_completion, [Id, Idx]),
       ets:match_delete(?TAB, #chunk { idt = {Id, Idx, '_'}, _ = '_'}).
   
  
positive.code:     RowsN = ets:select(?TAB, [{MatchHeadNotFetch, [], [{{'$1', '$2'}}]}]),
      Eligible = [{PN, Chunk} || {PN, Chunk} <- RowsA ++ RowsN,
                                  gb_sets:is_element(PN, PieceSet)],
      [{PN, Os, Sz} || {PN, {Os, Sz}} <- Eligible].
  
  %% @doc Chunkify a new piece.
  %%
  
negative.code:     Rows = ets:select(?TAB, [{MatchHead, [], ['$_']}]),
      lists:foreach(F, Rows),
      ok.
  
  -ifdef(TEST).
  -include_lib("eunit/include/eunit.hrl").
  -define(chunk_server, ?MODULE).
  
  chunk_server_registry_test() ->
      ?assertEqual(true, ?chunk_server:register_chunk_server(1)),
      ?assertEqual(self(), ?chunk_server:lookup_chunk_server(1)).
  
  
  