]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Make everything unreadable so rustfmt is happy
authorMatt Corallo <git@bluematt.me>
Tue, 4 May 2021 20:07:59 +0000 (20:07 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 4 May 2021 20:12:30 +0000 (20:12 +0000)
src/cli.rs
src/main.rs

index 04b18f9815acc858ff92a0820227941bc7265598..d7a76bc03c9768c7f076afc1ec777fd8d296dec5 100644 (file)
@@ -463,7 +463,14 @@ pub(crate) async fn connect_peer_if_necessary(
                        return Ok(());
                }
        }
-       match lightning_net_tokio::connect_outbound(Arc::clone(&peer_manager), event_notifier, pubkey, peer_addr).await {
+       match lightning_net_tokio::connect_outbound(
+               Arc::clone(&peer_manager),
+               event_notifier,
+               pubkey,
+               peer_addr,
+       )
+       .await
+       {
                Some(conn_closed_fut) => {
                        let mut closed_fut_box = Box::pin(conn_closed_fut);
                        let mut peer_connected = false;
@@ -472,7 +479,7 @@ pub(crate) async fn connect_peer_if_necessary(
                                        std::task::Poll::Ready(_) => {
                                                println!("ERROR: Peer disconnected before we finished the handshake");
                                                return Err(());
-                                       },
+                                       }
                                        std::task::Poll::Pending => {}
                                }
                                for node_pubkey in peer_manager.get_peer_node_ids() {
index bf0e24e9051ed6e8d75568f589d0da9fbd3f5570..653ad8e9fa90b10c0790d451d7251153a1c95a7d 100644 (file)
@@ -482,14 +482,19 @@ async fn start_ldk() {
        let event_notifier = event_ntfn_sender.clone();
        let listening_port = args.ldk_peer_listening_port;
        tokio::spawn(async move {
-               let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", listening_port)).await.unwrap();
+               let listener =
+                       tokio::net::TcpListener::bind(format!("0.0.0.0:{}", listening_port)).await.unwrap();
                loop {
                        let peer_mgr = peer_manager_connection_handler.clone();
                        let notifier = event_notifier.clone();
                        let tcp_stream = listener.accept().await.unwrap().0;
                        tokio::spawn(async move {
-                               lightning_net_tokio::setup_inbound(peer_mgr.clone(), notifier.clone(), tcp_stream.into_std().unwrap())
-                                       .await;
+                               lightning_net_tokio::setup_inbound(
+                                       peer_mgr.clone(),
+                                       notifier.clone(),
+                                       tcp_stream.into_std().unwrap(),
+                               )
+                               .await;
                        });
                }
        });