diff --git a/dragonfly-client/src/task/mod.rs b/dragonfly-client/src/task/mod.rs index 09b76020..b4ee5ded 100644 --- a/dragonfly-client/src/task/mod.rs +++ b/dragonfly-client/src/task/mod.rs @@ -231,7 +231,13 @@ impl Task { return Err(err); } }; - info!("interested pieces: {:?}", interested_pieces); + info!( + "interested pieces: {:?}", + interested_pieces + .iter() + .map(|p| p.number) + .collect::>() + ); // Construct the pieces for the download task started response. let mut pieces = Vec::new(); @@ -338,6 +344,9 @@ impl Task { info!( "interested pieces after removing the finished piece: {:?}", interested_pieces + .iter() + .map(|p| p.number) + .collect::>() ); // Check if all pieces are downloaded. @@ -552,7 +561,14 @@ impl Task { } announce_peer_response::Response::NormalTaskResponse(response) => { // If the task is normal, download the pieces from the remote peer. - info!("normal task response: {:?}", response); + info!( + "normal task response: {:?}", + response + .candidate_parents + .iter() + .map(|p| p.id.clone()) + .collect::>() + ); // Send the download peer started request. in_stream_tx diff --git a/dragonfly-client/src/task/piece.rs b/dragonfly-client/src/task/piece.rs index 80199019..5c7f5332 100644 --- a/dragonfly-client/src/task/piece.rs +++ b/dragonfly-client/src/task/piece.rs @@ -154,8 +154,13 @@ impl Piece { } info!( - "calculate interested pieces by range: {:?}, {:?}", - range, pieces + "calculate interested pieces by range: {:?}, piece length: {:?}. pieces: {:?}", + range, + piece_length, + pieces + .iter() + .map(|piece| piece.number) + .collect::>() ); return Ok(pieces); } @@ -194,8 +199,12 @@ impl Piece { } info!( - "calculate interested pieces by content length: {:?}", + "calculate interested pieces by content length, piece length: {:?}, pieces: {:?}", + piece_length, pieces + .iter() + .map(|piece| piece.number) + .collect::>() ); Ok(pieces) }