more refactor checkpoint
This commit is contained in:
@@ -537,15 +537,13 @@ impl NetworkManager {
|
||||
}
|
||||
|
||||
pub async fn tick(&self) -> EyreResult<()> {
|
||||
let (routing_table, net, receipt_manager, protocol_config) = {
|
||||
let (routing_table, net, receipt_manager) = {
|
||||
let inner = self.inner.lock();
|
||||
let components = inner.components.as_ref().unwrap();
|
||||
let protocol_config = inner.protocol_config.as_ref().unwrap();
|
||||
(
|
||||
inner.routing_table.as_ref().unwrap().clone(),
|
||||
components.net.clone(),
|
||||
components.receipt_manager.clone(),
|
||||
protocol_config.clone(),
|
||||
)
|
||||
};
|
||||
|
||||
|
@@ -608,7 +608,7 @@ impl Network {
|
||||
self.unlocked_inner
|
||||
.interfaces
|
||||
.with_interfaces(|interfaces| {
|
||||
for (name, intf) in interfaces {
|
||||
for (_name, intf) in interfaces {
|
||||
// Skip networks that we should never encounter
|
||||
if intf.is_loopback() || !intf.is_running() {
|
||||
return;
|
||||
|
@@ -411,12 +411,6 @@ impl NetworkManager {
|
||||
// Get all nodes needing pings in the LocalNetwork routing domain
|
||||
let node_refs = routing_table.get_nodes_needing_ping(RoutingDomain::LocalNetwork, cur_ts);
|
||||
|
||||
// Get our LocalNetwork dial info
|
||||
let dids = routing_table.all_filtered_dial_info_details(
|
||||
RoutingDomain::LocalNetwork.into(),
|
||||
&DialInfoFilter::all(),
|
||||
);
|
||||
|
||||
// For all nodes needing pings, figure out how many and over what protocols
|
||||
for nr in node_refs {
|
||||
let rpc = rpc.clone();
|
||||
@@ -437,8 +431,6 @@ impl NetworkManager {
|
||||
_last_ts: u64,
|
||||
cur_ts: u64,
|
||||
) -> EyreResult<()> {
|
||||
let rpc = self.rpc_processor();
|
||||
let routing_table = self.routing_table();
|
||||
let mut unord = FuturesUnordered::new();
|
||||
|
||||
// PublicInternet
|
||||
|
Reference in New Issue
Block a user