Skip to content

Commit

Permalink
chore(dcutr): add happy-path logs
Browse files Browse the repository at this point in the history
Resolves: #4504.

Pull-Request: #4723.
  • Loading branch information
thomaseizinger authored Oct 25, 2023
1 parent c3740a1 commit dc73cf2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions protocols/dcutr/src/behaviour_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ impl NetworkBehaviour for Behaviour {
)]);
}
Either::Left(handler::relayed::Event::InboundConnectNegotiated(remote_addrs)) => {
log::debug!(
"Attempting to hole-punch as dialer to {event_source} using {remote_addrs:?}"
);

let opts = DialOpts::peer_id(event_source)
.addresses(remote_addrs)
.condition(dial_opts::PeerCondition::Always)
Expand All @@ -322,6 +326,10 @@ impl NetworkBehaviour for Behaviour {
));
}
Either::Left(handler::relayed::Event::OutboundConnectNegotiated { remote_addrs }) => {
log::debug!(
"Attempting to hole-punch as listener to {event_source} using {remote_addrs:?}"
);

let opts = DialOpts::peer_id(event_source)
.condition(dial_opts::PeerCondition::Always)
.addresses(remote_addrs)
Expand Down

0 comments on commit dc73cf2

Please sign in to comment.