anchor.diff:      etorrent_peer_send:unchoke(S#state.send_pid),
       {noreply, S};
   handle_cast(interested, S) ->
  -    {noreply, statechange_interested(S, true)};
  +    statechange_interested(S#state.local_interested, S#state.send_pid, true),
  +    {noreply, S#state {local_interested = true}};
   handle_cast({have, PN}, #state { piece_set = unknown, send_pid = SPid } = S) ->
       etorrent_peer_send:have(SPid, PN),
       {noreply, S};
  
positive.code:             case etorrent_chunk_mgr:pick_chunks(S#state.torrent_id,
                                                  S#state.piece_set,
                                                  PiecesToQueue) of
                  not_interested -> {ok, statechange_interested(S, false)};
                  none_eligible -> {ok, S};
                  {ok, Items} -> queue_items(Items, S);
                  {endgame, Items} -> queue_items(Items, S#state { endgame = true })
  
negative.code:     end,
      case etorrent_piece_mgr:check_interest(Torrent_Id, PieceSet) of
          {interested, Pruned} ->
              statechange_interested(S#state.local_interested, S#state.send_pid, true),
              NS = S#state {piece_set = gb_sets:from_list(Pruned),
                              pieces_left = Left,
                              seeder = Left == 0,
                              local_interested = true},
              {ok, NS};
          not_interested ->
              {ok, S#state{piece_set = gb_sets:empty(), pieces_left = Left,
                           seeder = Left == 0}};
  