Преглед изворни кода

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

parazyd пре 3 година
родитељ
комит
814c701677
2 измењених фајлова са 3 додато и 1 уклоњено
  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 {
                     } else {
                         error!(
                         error!(
                             target: "net::channel::main_receive_loop()",
                             target: "net::channel::main_receive_loop()",
-                            "Read error on channel {}: {}",
+                            "[P2P] Read error on channel {}: {}",
                             self.address(), err,
                             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
     /// (exists) or connecting (pending). If no address was found, we'll attempt
     /// to do peer discovery and try to fill the slot again.
     /// to do peer discovery and try to fill the slot again.
     async fn load_address(&self, slot_number: usize, transports: &[String]) -> Result<Url> {
     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 {
         loop {
             let p2p = self.p2p();
             let p2p = self.p2p();
             let retry_sleep = p2p.settings().outbound_connect_timeout;
             let retry_sleep = p2p.settings().outbound_connect_timeout;