Procházet zdrojové kódy

net/outbound: Add a TODO note on reseeding peers.

parazyd před 3 roky
rodič
revize
814c701677
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 1 1
      src/net/channel.rs
  2. 2 0
      src/net/session/outbound_session.rs

+ 1 - 1
src/net/channel.rs

@@ -312,7 +312,7 @@ impl Channel {
                     } else {
                         error!(
                             target: "net::channel::main_receive_loop()",
-                            "Read error on channel {}: {}",
+                            "[P2P] Read error on channel {}: {}",
                             self.address(), err,
                         );
                     }

+ 2 - 0
src/net/session/outbound_session.rs

@@ -302,6 +302,8 @@ impl OutboundSession {
     /// (exists) or connecting (pending). If no address was found, we'll attempt
     /// to do peer discovery and try to fill the slot again.
     async fn load_address(&self, slot_number: usize, transports: &[String]) -> Result<Url> {
+        // TODO: At some point we're able to lose all known peers. We need to reseed at that point.
+
         loop {
             let p2p = self.p2p();
             let retry_sleep = p2p.settings().outbound_connect_timeout;