anchor.diff:  init([TorrentID, ChunkSize, FetchedPieces, PieceSizes, InitTorrentPid]) ->
       etorrent_scarcity:await_scarcity_server(TorrentID),
       true = register_chunk_server(TorrentID),
  +    Pending = etorrent_pending:originhandle(),
   
       NumPieces = length(PieceSizes),
       PiecesValid = etorrent_pieceset:from_list(FetchedPieces, NumPieces),
  
positive.code:         %% Initially, the sets of assigned and stored chunks are equal
          chunks_assigned=ChunkSets,
          chunks_stored=ChunkSets,
          peer_monitors=etorrent_monitorset:new(),
          prio_begun=PriorityBegun,
          prio_unassigned=PriorityUnass},
      {ok, InitState}.
  
  
  handle_call({register_peer, PeerPid}, _, State) ->
      %% Add a new peer to the set of monitored peers. Set the initial state
      %% of the monitored peer to an empty set open requests so that we don't
      %% need to check for this during the lifetime of the peer.
      #state{peer_monitors=PeerMonitors} = State,
      OpenReqs = gb_trees:empty(),
      NewMonitors = etorrent_monitorset:insert(PeerPid, OpenReqs, PeerMonitors),
      NewState = State#state{peer_monitors=NewMonitors},
      {reply, true, NewState};
  
  handle_call({request_chunks, PeerPid, Peerset, Numchunks}, _, State) ->
      #state{
  
negative.code:         pieces_begun=Begun,
          pieces_assigned=Assigned,
          chunks_assigned=AssignedChunks,
          prio_unassigned=PrioUnassigned,
          prio_begun=PrioBegun,
          pending=Pending} = State,
  
      %% If this peer has any pieces that we have begun downloading, pick
      %% one of those pieces over any unassigned pieces.
  