mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-17 09:34:16 -05:00
Log error upon rendezvous registration failure
This commit is contained in:
parent
abde566b35
commit
92e77d1b71
1 changed files with 5 additions and 2 deletions
|
|
@ -299,19 +299,22 @@ where
|
||||||
|
|
||||||
// TODO: this can most likely not happen at all, potentially remove these checks
|
// TODO: this can most likely not happen at all, potentially remove these checks
|
||||||
if rendezvous_node != self.rendezvous_node_peer_id {
|
if rendezvous_node != self.rendezvous_node_peer_id {
|
||||||
tracing::warn!(peer_id=%rendezvous_node, "Ignoring message from unknown rendezvous node");
|
tracing::error!(peer_id=%rendezvous_node, "Ignoring message from unknown rendezvous node");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Consider implementing From for Namespace and XmrBtcNamespace
|
// TODO: Consider implementing From for Namespace and XmrBtcNamespace
|
||||||
if namespace.to_string() != self.rendezvous_namespace.to_string() {
|
if namespace.to_string() != self.rendezvous_namespace.to_string() {
|
||||||
tracing::warn!(peer_id=%rendezvous_node, %namespace, "Ignoring message from rendezvous node for unknown namespace");
|
tracing::error!(peer_id=%rendezvous_node, %namespace, "Ignoring message from rendezvous node for unknown namespace");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// record re-registration after half the ttl has expired
|
// record re-registration after half the ttl has expired
|
||||||
self.rendezvous_reregister_timestamp = Some(Instant::now() + Duration::from_secs(ttl) / 2);
|
self.rendezvous_reregister_timestamp = Some(Instant::now() + Duration::from_secs(ttl) / 2);
|
||||||
}
|
}
|
||||||
|
Some(SwarmEvent::Behaviour(OutEvent::RegisterFailed(error))) => {
|
||||||
|
tracing::error!(rendezvous_node=%self.rendezvous_node_peer_id, "Registration with rendezvous node failed: {:#}", error);
|
||||||
|
}
|
||||||
Some(SwarmEvent::Behaviour(OutEvent::Failure {peer, error})) => {
|
Some(SwarmEvent::Behaviour(OutEvent::Failure {peer, error})) => {
|
||||||
tracing::error!(
|
tracing::error!(
|
||||||
%peer,
|
%peer,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue