mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-03-29 00:58:09 -04:00
wasm warnings
This commit is contained in:
parent
b590e3f28a
commit
11c19d1bad
@ -9,7 +9,8 @@ impl NetworkManager {
|
|||||||
/// in this case, if it matches the node ref's filters and no more permissive connection
|
/// in this case, if it matches the node ref's filters and no more permissive connection
|
||||||
/// could be established.
|
/// could be established.
|
||||||
///
|
///
|
||||||
/// Sending to a node requires determining a NetworkClass compatible mechanism
|
/// Sending to a node requires determining a NetworkClass compatible contact method
|
||||||
|
/// between the source and destination node
|
||||||
pub(crate) fn send_data(
|
pub(crate) fn send_data(
|
||||||
&self,
|
&self,
|
||||||
destination_node_ref: NodeRef,
|
destination_node_ref: NodeRef,
|
||||||
|
@ -259,6 +259,7 @@ impl DialInfo {
|
|||||||
Self::WSS(di) => di.socket_address.ip_addr(),
|
Self::WSS(di) => di.socket_address.ip_addr(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn port(&self) -> u16 {
|
pub fn port(&self) -> u16 {
|
||||||
match self {
|
match self {
|
||||||
Self::UDP(di) => di.socket_address.port(),
|
Self::UDP(di) => di.socket_address.port(),
|
||||||
@ -267,6 +268,7 @@ impl DialInfo {
|
|||||||
Self::WSS(di) => di.socket_address.port(),
|
Self::WSS(di) => di.socket_address.port(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn set_port(&mut self, port: u16) {
|
pub fn set_port(&mut self, port: u16) {
|
||||||
match self {
|
match self {
|
||||||
Self::UDP(di) => di.socket_address.set_port(port),
|
Self::UDP(di) => di.socket_address.set_port(port),
|
||||||
@ -275,6 +277,7 @@ impl DialInfo {
|
|||||||
Self::WSS(di) => di.socket_address.set_port(port),
|
Self::WSS(di) => di.socket_address.set_port(port),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn to_socket_addr(&self) -> SocketAddr {
|
pub fn to_socket_addr(&self) -> SocketAddr {
|
||||||
match self {
|
match self {
|
||||||
Self::UDP(di) => di.socket_address.socket_addr(),
|
Self::UDP(di) => di.socket_address.socket_addr(),
|
||||||
|
@ -30,6 +30,7 @@ impl SocketAddress {
|
|||||||
pub fn port(&self) -> u16 {
|
pub fn port(&self) -> u16 {
|
||||||
self.port
|
self.port
|
||||||
}
|
}
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn set_port(&mut self, port: u16) {
|
pub fn set_port(&mut self, port: u16) {
|
||||||
self.port = port
|
self.port = port
|
||||||
}
|
}
|
||||||
|
@ -240,6 +240,7 @@ impl BucketEntryInner {
|
|||||||
move |e1, e2| Self::cmp_fastest_reliable(cur_ts, e1, e2)
|
move |e1, e2| Self::cmp_fastest_reliable(cur_ts, e1, e2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn clear_signed_node_info(&mut self, routing_domain: RoutingDomain) {
|
pub fn clear_signed_node_info(&mut self, routing_domain: RoutingDomain) {
|
||||||
// Get the correct signed_node_info for the chosen routing domain
|
// Get the correct signed_node_info for the chosen routing domain
|
||||||
let opt_current_sni = match routing_domain {
|
let opt_current_sni = match routing_domain {
|
||||||
|
@ -461,6 +461,7 @@ impl RoutingTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set up the local network routing domain with our local routing table configuration
|
/// Set up the local network routing domain with our local routing table configuration
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn configure_local_network_routing_domain(&self, local_networks: Vec<(IpAddr, IpAddr)>) {
|
pub fn configure_local_network_routing_domain(&self, local_networks: Vec<(IpAddr, IpAddr)>) {
|
||||||
log_net!(debug "configure_local_network_routing_domain: {:#?}", local_networks);
|
log_net!(debug "configure_local_network_routing_domain: {:#?}", local_networks);
|
||||||
self.inner
|
self.inner
|
||||||
@ -501,6 +502,7 @@ impl RoutingTable {
|
|||||||
.all_filtered_dial_info_details(routing_domain_set, filter)
|
.all_filtered_dial_info_details(routing_domain_set, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn ensure_dial_info_is_valid(&self, domain: RoutingDomain, dial_info: &DialInfo) -> bool {
|
pub fn ensure_dial_info_is_valid(&self, domain: RoutingDomain, dial_info: &DialInfo) -> bool {
|
||||||
self.inner
|
self.inner
|
||||||
.read()
|
.read()
|
||||||
@ -755,6 +757,7 @@ impl RoutingTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Makes a filter that finds nodes with a matching inbound dialinfo
|
/// Makes a filter that finds nodes with a matching inbound dialinfo
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn make_inbound_dial_info_entry_filter<'a>(
|
pub fn make_inbound_dial_info_entry_filter<'a>(
|
||||||
routing_domain: RoutingDomain,
|
routing_domain: RoutingDomain,
|
||||||
dial_info_filter: DialInfoFilter,
|
dial_info_filter: DialInfoFilter,
|
||||||
|
@ -13,6 +13,7 @@ enum RoutingDomainChange {
|
|||||||
SetRelayNodeKeepalive {
|
SetRelayNodeKeepalive {
|
||||||
ts: Option<Timestamp>,
|
ts: Option<Timestamp>,
|
||||||
},
|
},
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
AddDialInfoDetail {
|
AddDialInfoDetail {
|
||||||
dial_info_detail: DialInfoDetail,
|
dial_info_detail: DialInfoDetail,
|
||||||
},
|
},
|
||||||
|
@ -536,6 +536,7 @@ impl Default for LocalNetworkRoutingDomainDetail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl LocalNetworkRoutingDomainDetail {
|
impl LocalNetworkRoutingDomainDetail {
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn set_local_networks(&mut self, mut local_networks: Vec<(IpAddr, IpAddr)>) -> bool {
|
pub fn set_local_networks(&mut self, mut local_networks: Vec<(IpAddr, IpAddr)>) -> bool {
|
||||||
local_networks.sort();
|
local_networks.sort();
|
||||||
if local_networks == self.local_networks {
|
if local_networks == self.local_networks {
|
||||||
|
@ -111,6 +111,7 @@ impl RoutingTableInner {
|
|||||||
self.with_routing_domain(domain, |rd| rd.common().dial_info_details().clone())
|
self.with_routing_domain(domain, |rd| rd.common().dial_info_details().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn first_filtered_dial_info_detail(
|
pub fn first_filtered_dial_info_detail(
|
||||||
&self,
|
&self,
|
||||||
routing_domain_set: RoutingDomainSet,
|
routing_domain_set: RoutingDomainSet,
|
||||||
@ -323,6 +324,7 @@ impl RoutingTableInner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub fn configure_local_network_routing_domain(
|
pub fn configure_local_network_routing_domain(
|
||||||
&mut self,
|
&mut self,
|
||||||
local_networks: Vec<(IpAddr, IpAddr)>,
|
local_networks: Vec<(IpAddr, IpAddr)>,
|
||||||
|
@ -279,6 +279,7 @@ struct RPCProcessorUnlockedInner {
|
|||||||
queue_size: u32,
|
queue_size: u32,
|
||||||
concurrency: u32,
|
concurrency: u32,
|
||||||
max_route_hop_count: usize,
|
max_route_hop_count: usize,
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
validate_dial_info_receipt_time_ms: u32,
|
validate_dial_info_receipt_time_ms: u32,
|
||||||
update_callback: UpdateCallback,
|
update_callback: UpdateCallback,
|
||||||
waiting_rpc_table: OperationWaiter<RPCMessage, Option<QuestionContext>>,
|
waiting_rpc_table: OperationWaiter<RPCMessage, Option<QuestionContext>>,
|
||||||
|
@ -6,6 +6,7 @@ impl RPCProcessor {
|
|||||||
feature = "verbose-tracing",
|
feature = "verbose-tracing",
|
||||||
instrument(level = "trace", skip(self), ret, err)
|
instrument(level = "trace", skip(self), ret, err)
|
||||||
)]
|
)]
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||||
pub async fn rpc_call_validate_dial_info(
|
pub async fn rpc_call_validate_dial_info(
|
||||||
self,
|
self,
|
||||||
peer: NodeRef,
|
peer: NodeRef,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user