skoupidi 2 lat temu
rodzic
commit
17f928db22
2 zmienionych plików z 9 dodań i 8 usunięć
  1. 6 4
      bin/lilith/src/main.rs
  2. 3 4
      src/net/session/manual_session.rs

+ 6 - 4
bin/lilith/src/main.rs

@@ -39,7 +39,11 @@ use url::Url;
 
 use darkfi::{
     async_daemonize, cli_desc,
-    net::{self, hosts::store::HostState, hosts::refinery::ping_node, P2p, P2pPtr},
+    net::{
+        self,
+        hosts::{refinery::ping_node, store::HostState},
+        P2p, P2pPtr,
+    },
     rpc::{
         jsonrpc::*,
         server::{listen_and_serve, RequestHandler},
@@ -176,9 +180,7 @@ impl Lilith {
             let (entry, position) = hosts.whitelist_fetch_last().await;
             let url = &entry.0;
 
-            if let Err(_) =
-                hosts.try_update_registry(url.clone(), HostState::Refining).await
-            {
+            if let Err(_) = hosts.try_update_registry(url.clone(), HostState::Refining).await {
                 continue
             }
 

+ 3 - 4
src/net/session/manual_session.rs

@@ -158,10 +158,9 @@ impl ManualSession {
                         addr, e,
                     );
 
-                // Stop tracking this address in the HostRegistry.
-                // Otherwise, host will be stuck in Pending state.
-                self.p2p().hosts().remove(&addr).await;
-
+                    // Stop tracking this address in the HostRegistry.
+                    // Otherwise, host will be stuck in Pending state.
+                    self.p2p().hosts().remove(&addr).await;
                 }
             }