Просмотр исходного кода

bin/darkfi: remove p2p.run() stoppable task

Dastan-glitch 2 лет назад
Родитель
Сommit
64834ef6e8
1 измененных файлов с 0 добавлено и 24 удалено
  1. 0 24
      bin/darkfid/src/main.rs

+ 0 - 24
bin/darkfid/src/main.rs

@@ -443,17 +443,6 @@ async fn realmain(args: Args, ex: Arc<smol::Executor<'static>>) -> Result<()> {
 
     info!("Starting sync P2P network");
     sync_p2p.clone().unwrap().start().await?;
-    StoppableTask::new().start(
-        sync_p2p.clone().unwrap().run(),
-        |res| async {
-            match res {
-                Ok(()) | Err(Error::P2PNetworkStopped) => { /* Do nothing */ }
-                Err(e) => error!(target: "darkfid", "Failed starting sync P2P network: {}", e),
-            }
-        },
-        Error::P2PNetworkStopped,
-        ex.clone(),
-    );
 
     // TODO: I think this is not necessary anymore
     //info!("Waiting for sync P2P outbound connections");
@@ -469,19 +458,6 @@ async fn realmain(args: Args, ex: Arc<smol::Executor<'static>>) -> Result<()> {
         info!("Starting consensus P2P network");
         let consensus_p2p = consensus_p2p.clone().unwrap();
         consensus_p2p.clone().start().await?;
-        StoppableTask::new().start(
-            consensus_p2p.clone().run(),
-            |res| async {
-                match res {
-                    Ok(()) | Err(Error::P2PNetworkStopped) => { /* Do nothing */ }
-                    Err(e) => {
-                        error!(target: "darkfid", "Failed starting consensus P2P network: {}", e)
-                    }
-                }
-            },
-            Error::P2PNetworkStopped,
-            ex.clone(),
-        );
 
         // TODO: I think this is not necessary anymore
         //info!("Waiting for consensus P2P outbound connections");