anchor.diff:      etorrent_peer_send:not_interested(SendPid),
       ok.
   
  -peer_have(PN, #state { piece_set = unknown } = S) ->
  -    peer_have(PN, S#state {piece_set = gb_sets:new()});
  +peer_have(PN, #state{piece_set=unknown}=State) ->
  +    #state{torrent_id=TorrentID} = State,
  +    {value, NumPieces} = etorrent_torrent:num_pieces(TorrentID),
  +    Pieceset = etorrent_pieceset:new(NumPieces),
  +    NewState = State#state{piece_set=Pieceset},
  +    peer_have(PN, NewState);
   peer_have(PN, S) ->
       case etorrent_piece_mgr:valid(S#state.torrent_id, PN) of
           true ->
  
positive.code: handle_message({suggest, Idx}, S) ->
      ?INFO([{peer_id, S#state.remote_peer_id}, {suggest, Idx}]),
      {ok, S};
  handle_message(have_none, #state { piece_set = PS } = S) when PS =/= unknown ->
      {stop, normal, S};
  handle_message(have_none, #state { fast_extension = true, torrent_id = Torrent_Id } = S) ->
      {value, Size} = etorrent_torrent:num_pieces(Torrent_Id),
      {ok, S#state { piece_set = gb_sets:new(),
                     pieces_left = Size,
                     seeder = false}};
  handle_message(have_all, #state { piece_set = PS }) when PS =/= unknown ->
      {error, piece_set_out_of_band};
  handle_message(have_all, #state { fast_extension = true, torrent_id = Torrent_Id } = S) ->
      {value, Size} = etorrent_torrent:num_pieces(Torrent_Id),
      FullSet = gb_sets:from_list(lists:seq(0, Size - 1)),
      {ok, S#state { piece_set = FullSet,
                     pieces_left = 0,
                     seeder = true }};
  handle_message({bitfield, _BF},
      #state { piece_set = PS, socket = Socket, remote_peer_id = RemotePid })
              when PS =/= unknown ->
      {ok, {IP, Port}} = inet:peername(Socket),
      etorrent_peer_mgr:enter_bad_peer(IP, Port, RemotePid),
      {error, piece_set_out_of_band};
  handle_message({bitfield, BitField},
          #state { torrent_id = Torrent_Id, pieces_left = Pieces_Left,
                   remote_peer_id = RemotePid } = S) ->
      {value, Size} = etorrent_torrent:num_pieces(Torrent_Id),
      {ok, PieceSet} =
          etorrent_proto_wire:decode_bitfield(Size, BitField),
      Left = Pieces_Left - etorrent_pieceset:size(PieceSet),
      case Left of
          0  -> ok = etorrent_table:statechange_peer(self(), seeder);
          _N -> ok
      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}};
          invalid_piece ->
              {stop, {invalid_piece_2, RemotePid}, S}
      end;
  handle_message({piece, Index, Offset, Data}, #state { remote_request_set = RS } = S) ->
      case handle_got_chunk(Index, Offset, Data, RS,
  
negative.code: 
                   remote_request_set = gb_sets:empty() :: gb_set(),
  
                   piece_set = unknown :: unknown | pieceset(),
                   piece_request = [],
  
  		 %% Are we in endgame mode?
                   endgame = false              :: boolean(),
  