Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Oct 31, 2024
1 parent 5acfe8d commit da8335c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mm2src/mm2_p2p/src/behaviours/atomicdex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,16 @@ fn start_gossipsub(
}

while let Poll::Ready(Some(Some(peer_id))) = timestamp_rx.poll_next_unpin(cx) {
println!("Peer '{}' has incorrect time, disconnecting from it.", peer_id);
swarm.disconnect_peer_id(peer_id).expect("TODO");
println!("Peer `{peer_id}` is out of sync in time; disconnecting.");

if swarm.disconnect_peer_id(peer_id).is_err() {
error!("Disconnection from `{peer_id}` failed unexpectedly, which should never happen.");
}

let peer_list: Vec<_> = swarm.connected_peers().collect();
println!("????????????????");
dbg!(peer_list);
println!("!!!!!!!!!!!!!!!!");
}

loop {
Expand Down

0 comments on commit da8335c

Please sign in to comment.