From 2a807715b6dd0f0d5be477d05a8ee87cd8f2d220 Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 11 Jul 2023 21:56:13 -0400 Subject: [PATCH] network debugging --- .../src/routing_table/routing_table_inner.rs | 19 ++++++++++++------- veilid-core/src/rpc_processor/mod.rs | 6 +++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/veilid-core/src/routing_table/routing_table_inner.rs b/veilid-core/src/routing_table/routing_table_inner.rs index ef1f5401..92586e6d 100644 --- a/veilid-core/src/routing_table/routing_table_inner.rs +++ b/veilid-core/src/routing_table/routing_table_inner.rs @@ -852,14 +852,19 @@ impl RoutingTableInner { } } - // Register relay info first if we have that + // Register relay info first if we have that and the relay isn't us if let Some(relay_peer_info) = peer_info.signed_node_info().relay_peer_info() { - self.register_node_with_peer_info( - outer_self.clone(), - routing_domain, - relay_peer_info, - false, - )?; + if !self + .unlocked_inner + .matches_own_node_id(relay_peer_info.node_ids()) + { + self.register_node_with_peer_info( + outer_self.clone(), + routing_domain, + relay_peer_info, + false, + )?; + } } let (node_ids, signed_node_info) = peer_info.destructure(); diff --git a/veilid-core/src/rpc_processor/mod.rs b/veilid-core/src/rpc_processor/mod.rs index 06931555..422a495b 100644 --- a/veilid-core/src/rpc_processor/mod.rs +++ b/veilid-core/src/rpc_processor/mod.rs @@ -1658,7 +1658,7 @@ impl RPCProcessor { let span_id = Span::current().id(); send_channel .try_send((span_id, msg)) - .wrap_err("failed to enqueue received RPC message")?; + .map_err(|e| eyre!("failed to enqueue direct RPC message: {}", e))?; Ok(()) } @@ -1694,7 +1694,7 @@ impl RPCProcessor { let span_id = Span::current().id(); send_channel .try_send((span_id, msg)) - .wrap_err("failed to enqueue received RPC message")?; + .map_err(|e| eyre!("failed to enqueue safety routed RPC message: {}", e))?; Ok(()) } @@ -1733,7 +1733,7 @@ impl RPCProcessor { let span_id = Span::current().id(); send_channel .try_send((span_id, msg)) - .wrap_err("failed to enqueue received RPC message")?; + .map_err(|e| eyre!("failed to enqueue private routed RPC message: {}", e))?; Ok(()) } }