Browse Source

chore: correct debug statements and code comments

lunar-mining 2 years ago
parent
commit
b1511b991a

+ 4 - 4
src/net/hosts/store.rs

@@ -273,12 +273,12 @@ impl Hosts {
     /// Remove an entry from the hostlist. Called when we cannot establish a connection to a host or
     /// when a pre-existing connection disconnects.
     pub async fn remove_host(&self, addr: &Url) {
-        debug!(target: "store::downgrade_host", "Removing host {}", addr);
+        debug!(target: "store::remove_host", "Removing host {}", addr);
         self.mark_migrating(addr).await;
 
         // Remove channel from anchorlist
         if self.anchorlist_contains(addr).await {
-            debug!(target: "store::downgrade_host", "Removing from anchorlist {}", addr);
+            debug!(target: "store::remove_host", "Removing from anchorlist {}", addr);
 
             let index = self
                 .get_anchorlist_index_at_addr(addr.clone())
@@ -290,7 +290,7 @@ impl Hosts {
 
         // Remove channel from whitelist
         if self.whitelist_contains(addr).await {
-            debug!(target: "store::downgrade_host", "Removing from whitelist {}", addr);
+            debug!(target: "store::remove_host", "Removing from whitelist {}", addr);
 
             let index = self
                 .get_whitelist_index_at_addr(addr.clone())
@@ -302,7 +302,7 @@ impl Hosts {
 
         // Remove channel the greylist
         if self.greylist_contains(addr).await {
-            debug!(target: "store::downgrade_host", "Removing from greylist {}", addr);
+            debug!(target: "store::remove_host", "Removing from greylist {}", addr);
 
             let index = self
                 .get_greylist_index_at_addr(addr.clone())

+ 1 - 1
src/net/session/manual_session.rs

@@ -134,7 +134,7 @@ impl ManualSession {
                     // Remove pending lock since register_channel will add the channel to p2p
                     self.p2p().remove_pending(&addr).await;
 
-                    // Add this connection to the anchorlist, remove it from the [otherlist]
+                    // Add this connection to the anchorlist
                     self.p2p().hosts().upgrade_host(&addr).await;
 
                     // Notify that channel processing has finished

+ 1 - 1
src/net/session/outbound_session.rs

@@ -352,7 +352,7 @@ impl Slot {
 
             self.channel_id.store(channel.info.id, Ordering::Relaxed);
 
-            // Add this connection to the anchorlist, remove it from the [otherlist]
+            // Add this connection to the anchorlist
             hosts.upgrade_host(&addr).await;
 
             // Wait for channel to close