anchor.diff:      peer_id     :: binary(),
       parent_pid  :: pid(),
       tracker_pid :: pid(),
  -    progress    :: etorrent_progress:torrenthandle(),
  -    pending     :: etorrent_pending:torrenthandle(),
  -    endgame     :: etorrent_endgame:torrenthandle()}).
  +    progress    :: pid(),
  +    pending     :: pid(),
  +    endgame     :: pid()}).
   
   -define(CHECK_WAIT_TIME, 3000).
   
  
positive.code: init([Parent, Id, {Torrent, TorrentFile, TorrentIH}, PeerId]) ->
      etorrent_table:new_torrent(TorrentFile, TorrentIH, Parent, Id),
      gproc:add_local_name({torrent, Id, control}),
      Progress = etorrent_progress:torrenthandle(),
      Pending = etorrent_pending:torrenthandle(),
      Endgame = etorrent_endgame:torrenthandle(),
      InitState = #state{
          id=Id,
          torrent=Torrent,
  
negative.code: 
  started(pieces_assigned, State) ->
      #state{progress=Progress, pending=Pending, endgame=Endgame} = State, 
      ok = etorrent_endgame:activate(Endgame),
      ok = etorrent_pending:receiver(Endgame, Pending),
      {next_state, started, State};
  
  started({piece_stored, Index}, State) ->
  