]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Log ChannelPending events
authorMatt Corallo <git@bluematt.me>
Tue, 25 Apr 2023 05:57:00 +0000 (05:57 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 25 Apr 2023 06:25:42 +0000 (06:25 +0000)
src/main.rs

index cc67700525b5ff5acd2b1592c7319127e4e93fad..159fa5b777c4d70a317128c072f12f9ec6c20f63 100644 (file)
@@ -346,7 +346,15 @@ async fn handle_ldk_events(
                                .unwrap();
                        bitcoind_client.broadcast_transaction(&spending_tx);
                }
-               Event::ChannelPending { .. } => {}
+               Event::ChannelPending { channel_id, counterparty_node_id, .. } => {
+                       println!(
+                               "\nEVENT: Channel {} with peer {} is pending awaiting funding lock-in!",
+                               hex_utils::hex_str(&channel_id),
+                               hex_utils::hex_str(&counterparty_node_id.serialize()),
+                       );
+                       print!("> ");
+                       io::stdout().flush().unwrap();
+               }
                Event::ChannelReady {
                        ref channel_id,
                        user_channel_id: _,