Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean visitPieceMessage(PieceMessage message) {
- peer.downloadedBlocksCount++; //
- peer.data[message.blockIndex] = message.data;
- Peer[] checkin = new Peer[peer.peers2BlocksMap.size()];
- peer.peers2BlocksMap.keySet().toArray(new PeerInterface[peer.peers2BlocksMap.keySet().size()]);
- for (Peer uzel: checkin){
- uzel.have(peer, message.blockIndex);
- }
- for (byte[] check: peer.data){
- if (check == null){
- return false;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement