429 |
|
|
430 |
set_client_state c (Connected_downloading (file_num file)); |
set_client_state c (Connected_downloading (file_num file)); |
431 |
let len64 = Int64.of_int bloc_len in |
let len64 = Int64.of_int bloc_len in |
|
count_download c file len64; |
|
|
network_must_update network; |
|
432 |
|
|
433 |
(* TODO: verify the received data has been requested *) |
(* TODO: verify the received data has been requested *) |
434 |
|
|
460 |
(* List.iter Int64Swarmer.alloc_range c.client_ranges; *) |
(* List.iter Int64Swarmer.alloc_range c.client_ranges; *) |
461 |
let new_downloaded = |
let new_downloaded = |
462 |
Int64Swarmer.downloaded swarmer in |
Int64Swarmer.downloaded swarmer in |
463 |
c.client_downloaded <- c.client_downloaded ++ ( |
count_download c file (new_downloaded -- old_downloaded); |
464 |
new_downloaded -- old_downloaded); |
network_must_update network; |
465 |
(* |
(* |
466 |
if not (List.mem c.client_ip bb.block_contributors) then |
if not (List.mem c.client_ip bb.block_contributors) then |
467 |
bb.block_contributors <- c.client_ip :: |
bb.block_contributors <- c.client_ip :: |