anchor.diff:  -type monitorset() :: etorrent_monitorset:monitorset().
   
   -record(state, {
  +    torrent_id     :: pos_integer(),
       chunk_size     :: pos_integer(),
       pieces_valid   :: pieceset(),
       pieces_unknown :: pieceset(),
  
positive.code: code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  -ifdef(TEST).
  -define(chunk_server, ?MODULE).
  
  initial_chunk_server(ID) ->
      {ok, Pid} = ?chunk_server:start_link(ID, 1, [], [{0, 2}, {1, 2}, {2, 2}]),
  
negative.code:     #state{
          piece_chunks=PieceChunks,
          peer_monitors=Peers} = State,
      %% Add the chunks back to the chunkset of each piece.
      OpenReqs = etorrent_monitorset:fetch(Pid, Peers),
      NewPieceChunks = lists:foldl(fun({PieceIndex, Offset, Length}, Acc) ->
          insert_chunk(PieceIndex, Offset, Length, Acc)
      end, PieceChunks, chunk_list(OpenReqs)),
      %% Replace the peer's set of open requests with an empty set
      NewPeers = etorrent_monitorset:update(Pid, gb_trees:empty(), Peers),
      NewState = State#state{
          piece_chunks=NewPieceChunks,
          peer_monitors=NewPeers},
  