|
|
@@ -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");
|