anchor.diff:  %% @private
   init([TorrentID]) ->
       true = register_server(TorrentID),
  -    Table = ets:new(none, [private, set]),
  +    Table = ets:new(none, [private, set, {keypos, 1}]),
       InitState = #state{
           receiver=self(),
           table=Table},
  
positive.code:     ets:insert_new(Table, Row).
  
  delete_peer(Table, Peerpid) ->
      ets:delete(Table, Peerpid).
  
  insert_request(Table, Piece, Offset, Length, Pid) ->
      Row = {{Piece, Offset, Length, Pid}},
  
negative.code:     end.
  
  flush_requests(Table, Pid) ->
      Match = ets:fun2ms(fun({{I, O, L, P}}) -> {I, O, L} end),
      Requests  = ets:select(Table, Match),
      ets:select_delete(Table, Match),
      Requests.
  
  list_requests(Table) ->
      Match = ets:fun2ms(fun({{I, O, L, P}}) -> {I, O, L, P} end),
      ets:select(Table, Match).
  
  
  -ifdef(TEST).
  -include_lib("eunit/include/eunit.hrl").
  -define(pending, ?MODULE).
  -define(chunks, etorrent_chunkstate).
  -define(expect, etorrent_utils:expect).
  -define(wait, etorrent_utils:wait).
  -define(ping, etorrent_utils:ping).
  -define(first, etorrent_utils:first).
  
  
  testid() -> 0.
  testpid() -> ?pending:await_server(testid()).
  
  setup_env() ->
      {ok, Pid} = ?pending:start_link(testid()),
      ok = ?pending:receiver(self(), Pid),
      put({pending, testid()}, Pid),
      Pid.
  
  