int id; //peer id
unsigned int bitfield; //list of pieces the peer has.
- unsigned long bitfield_blocks; //list of blocks the peer has.
+ unsigned long long bitfield_blocks; //list of blocks the peer has.
short *pieces_count; //number of peers that have each piece.
unsigned int current_pieces; //current pieces the peer is downloading
void request_new_piece_to_peer(peer_t peer, connection_t remote_peer);
void send_request_to_peer(peer_t peer, connection_t remote_peer, int piece);
-void remove_current_piece(peer_t peer, connection_t remote_peer, int current_piece);
+void remove_current_piece(peer_t peer, connection_t remote_peer, unsigned int current_piece);
void update_active_peers_set(peer_t peer, connection_t remote_peer);
int select_piece_to_download(peer_t peer, connection_t remote_peer);