Merge pull request #986 from TheBlueMatt/2021-07-route-lasthop-value
[rust-lightning] / lightning / src / util / events.rs
index 1bdbff0333a520e0aced1526272d64bb94e75c40..0fc7c6b3a3d166096019407784b929588ddbddd8 100644 (file)
@@ -160,7 +160,6 @@ impl Writeable for Event {
                                write_tlv_fields!(writer, {
                                        (0, payment_preimage, required),
                                });
-                               payment_preimage.write(writer)?;
                        },
                        &Event::PaymentFailed { ref payment_hash, ref rejected_by_dest,
                                #[cfg(test)]
@@ -390,6 +389,15 @@ pub enum MessageSendEvent {
                /// The channel_update which should be sent.
                msg: 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: PublicKey,
+               /// The channel_update which should be sent.
+               msg: msgs::ChannelUpdate,
+       },
        /// Broadcast an error downstream to be handled
        HandleError {
                /// The node_id of the node which should receive this message