anchor.diff:  %% peers.
   %%
   
  --spec register_chunk_server(torrent_id()) -> true.
  -register_chunk_server(TorrentID) ->
  +-spec register_server(torrent_id()) -> true.
  +register_server(TorrentID) ->
       gproc:reg({n, l, chunk_server_key(TorrentID)}).
   
  --spec unregister_chunk_server(torrent_id()) -> true.
  -unregister_chunk_server(TorrentID) ->
  +-spec unregister_server(torrent_id()) -> true.
  +unregister_server(TorrentID) ->
       gproc:unreg({n, l, chunk_server_key(TorrentID)}).
   
  --spec lookup_chunk_server(torrent_id()) -> pid().
  -lookup_chunk_server(TorrentID) ->
  +-spec lookup_server(torrent_id()) -> pid().
  +lookup_server(TorrentID) ->
       gproc:lookup_pid({n, l, chunk_server_key(TorrentID)}).
   
  --spec await_chunk_server(torrent_id()) -> pid().
  -await_chunk_server(TorrentID) ->
  +-spec await_server(torrent_id()) -> pid().
  +await_server(TorrentID) ->
       Name = {n, l, chunk_server_key(TorrentID)},
       {Pid, undefined} = gproc:await(Name, 5000),
       Pid.
   
  --spec register_peer(torrent_id()) -> true.
  -register_peer(TorrentID) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    call(ChunkSrv, {register_peer, self()}).
  +-spec register(torrent_id()) -> true.
  +register(TorrentID) ->
  +    ChunkSrv = lookup_server(TorrentID),
  +    call(ChunkSrv, {register, self()}).
   
   chunk_server_key(TorrentID) ->
       {etorrent, TorrentID, chunk_server}.
  
positive.code: 
  all_stored_marks_stored_case() ->
      Has = etorrent_pieceset:from_list([0,1], 3),
      {ok, [{0, 0, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{0, 1, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      ?assertMatch({ok, [{1, 0, 1}]}, ?progress:request_chunks(testid(), Has, 1)),
      ?assertMatch({ok, [{1, 1, 1}]}, ?progress:request_chunks(testid(), Has, 1)).
  
  get_all_request_case() ->
      Has = etorrent_pieceset:from_list([0,1,2], 3),
      {ok, [{0, 0, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{0, 1, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{1, 0, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{1, 1, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{2, 0, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      {ok, [{2, 1, 1}]} = ?progress:request_chunks(testid(), Has, 1),
      ?assertEqual({ok, assigned}, ?progress:request_chunks(testid(), Has, 1)).
  
  unassigned_to_assigned_case() ->
      Has = etorrent_pieceset:from_list([0], 3),
      {ok, [{0,0,1}, {0,1,1}]} = ?progress:request_chunks(testid(), Has, 2),
      ?assertEqual({ok, assigned}, ?progress:request_chunks(testid(), Has, 1)).
  
  -endif.
  
negative.code:     {ok, InitState}.
  
  
  handle_call({request, PeerPid, Peerset, Numchunks}, _, State) ->
      #state{
          torrent_id=TorrentID,
          pieces_valid=Valid,
  