anchor.diff:  %% @doc
   %% Mark a piece as completly stored to disk and validated.
   %% @end
  --spec mark_valid(torrent_id(), pos_integer()) ->
  -          ok | {error, not_stored | valid}.
  -mark_valid(TorrentID, PieceIndex) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    call(ChunkSrv, {mark_valid, self(), PieceIndex}).
  +-spec mark_valid(pos_integer(), pid()) -> ok.
  +mark_valid(Piece, SrvPid) ->
  +    SrvPid ! {mark_valid, Piece},
  +    ok.
   
   
   %% @doc
  -%% Mark a chunk as fetched but not written to file.
  -%% @end
  --spec mark_fetched(torrent_id(), pos_integer(),
  -                   pos_integer(), pos_integer()) -> {ok, boolean()}.
  -mark_fetched(TorrentID, Index, Offset, Length) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    call(ChunkSrv, {mark_fetched, self(), Index, Offset, Length}).
  -
  -%& @doc
  -%% Mark a chunk as fetched and written to file.
  -%% @end
  --spec mark_stored(torrent_id(), pos_integer(),
  -                  pos_integer(), pos_integer()) -> ok.
  -mark_stored(TorrentID, Index, Offset, Length) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    call(ChunkSrv, {mark_stored, self(), Index, Offset, Length}).
  -
  -%& @doc
  -%% Reinsert a chunk into the request queue.
  -%% @end
  --spec mark_dropped(torrent_id(), pos_integer(),
  -                  pos_integer(), pos_integer()) -> ok.
  -mark_dropped(TorrentID, Index, Offset, Length) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    cast(ChunkSrv, {mark_dropped, self(), Index, Offset, Length}).
  -
  -%% @doc
  -%% Mark all currently open requests as dropped.
  -%% @end
  --spec mark_all_dropped(torrent_id()) -> ok.
  -mark_all_dropped(TorrentID) ->
  -    ChunkSrv = lookup_chunk_server(TorrentID),
  -    call(ChunkSrv, {mark_all_dropped, self()}).
  -
  -
  -%% @doc
  -%% Request a 
  +%% Request a unique set of chunks from the server.
   %% @end
   -spec request_chunks(torrent_id(), pieceset(), pos_integer()) ->
       {ok, list({piece_index(), chunk_offset(), chunk_len()})}
  
positive.code:             {reply, {ok, Chunks}, NewState}
      end;
  
  handle_call({mark_valid, _, Index}, _, State) ->
      #state{
          pieces_stored=Stored,
          pieces_valid=Valid} = State,
  
negative.code:     NewState = case Piecestate of
          %% Begun -> Begun
          begun ->
              State#state{chunks_stored=NewChunksStored};
          %% Assigned -> Assigned
          assigned when not Wasstored ->
              State#state{chunks_stored=NewChunksStored};
          %% Assigned -> Stored
          assigned ->
              ok = etorrent_torrent_ctl:piece_stored(TorrentPid, Index),
  