Update auto-generated bindings to latest upstream
[ldk-c-bindings] / lightning-c-bindings / src / lightning / util / events.rs
index cb28df82f252669b840434264f4e502570c29aae..7961f623bbc456c5ab50b8398cc3ddd0feca46fa 100644 (file)
@@ -460,6 +460,15 @@ pub enum MessageSendEvent {
                /// The channel_update which should be sent.
                msg: crate::lightning::ln::msgs::ChannelUpdate,
        },
+       /// Used to indicate that a channel_update should be sent to a single peer.
+       /// In contrast to [`Self::BroadcastChannelUpdate`], this is used when the channel is a
+       /// private channel and we shouldn't be informing all of our peers of channel parameters.
+       SendChannelUpdate {
+               /// The node_id of the node which should receive this message
+               node_id: crate::c_types::PublicKey,
+               /// The channel_update which should be sent.
+               msg: crate::lightning::ln::msgs::ChannelUpdate,
+       },
        /// Broadcast an error downstream to be handled
        HandleError {
                /// The node_id of the node which should receive this message
@@ -610,6 +619,14 @@ impl MessageSendEvent {
                                        msg: *unsafe { Box::from_raw(msg_nonref.take_inner()) },
                                }
                        },
+                       MessageSendEvent::SendChannelUpdate {ref node_id, ref msg, } => {
+                               let mut node_id_nonref = (*node_id).clone();
+                               let mut msg_nonref = (*msg).clone();
+                               nativeMessageSendEvent::SendChannelUpdate {
+                                       node_id: node_id_nonref.into_rust(),
+                                       msg: *unsafe { Box::from_raw(msg_nonref.take_inner()) },
+                               }
+                       },
                        MessageSendEvent::HandleError {ref node_id, ref action, } => {
                                let mut node_id_nonref = (*node_id).clone();
                                let mut action_nonref = (*action).clone();
@@ -735,6 +752,12 @@ impl MessageSendEvent {
                                        msg: *unsafe { Box::from_raw(msg.take_inner()) },
                                }
                        },
+                       MessageSendEvent::SendChannelUpdate {mut node_id, mut msg, } => {
+                               nativeMessageSendEvent::SendChannelUpdate {
+                                       node_id: node_id.into_rust(),
+                                       msg: *unsafe { Box::from_raw(msg.take_inner()) },
+                               }
+                       },
                        MessageSendEvent::HandleError {mut node_id, mut action, } => {
                                nativeMessageSendEvent::HandleError {
                                        node_id: node_id.into_rust(),
@@ -877,6 +900,14 @@ impl MessageSendEvent {
                                        msg: crate::lightning::ln::msgs::ChannelUpdate { inner: Box::into_raw(Box::new(msg_nonref)), is_owned: true },
                                }
                        },
+                       nativeMessageSendEvent::SendChannelUpdate {ref node_id, ref msg, } => {
+                               let mut node_id_nonref = (*node_id).clone();
+                               let mut msg_nonref = (*msg).clone();
+                               MessageSendEvent::SendChannelUpdate {
+                                       node_id: crate::c_types::PublicKey::from_rust(&node_id_nonref),
+                                       msg: crate::lightning::ln::msgs::ChannelUpdate { inner: Box::into_raw(Box::new(msg_nonref)), is_owned: true },
+                               }
+                       },
                        nativeMessageSendEvent::HandleError {ref node_id, ref action, } => {
                                let mut node_id_nonref = (*node_id).clone();
                                let mut action_nonref = (*action).clone();
@@ -1002,6 +1033,12 @@ impl MessageSendEvent {
                                        msg: crate::lightning::ln::msgs::ChannelUpdate { inner: Box::into_raw(Box::new(msg)), is_owned: true },
                                }
                        },
+                       nativeMessageSendEvent::SendChannelUpdate {mut node_id, mut msg, } => {
+                               MessageSendEvent::SendChannelUpdate {
+                                       node_id: crate::c_types::PublicKey::from_rust(&node_id),
+                                       msg: crate::lightning::ln::msgs::ChannelUpdate { inner: Box::into_raw(Box::new(msg)), is_owned: true },
+                               }
+                       },
                        nativeMessageSendEvent::HandleError {mut node_id, mut action, } => {
                                MessageSendEvent::HandleError {
                                        node_id: crate::c_types::PublicKey::from_rust(&node_id),