Merge pull request #1501 from tnull/2022-05-mention-compat-level
[rust-lightning] / lightning / src / util / events.rs
index 34a8a410b65d1ad5c603954ee1d2290f4ba4856f..a2794c329a26d827c214846d7cd571274e481b7e 100644 (file)
@@ -21,7 +21,7 @@ use ln::features::ChannelTypeFeatures;
 use ln::msgs;
 use ln::msgs::DecodeError;
 use ln::{PaymentPreimage, PaymentHash, PaymentSecret};
-use routing::network_graph::NetworkUpdate;
+use routing::gossip::NetworkUpdate;
 use util::ser::{BigSize, FixedLengthReader, Writeable, Writer, MaybeReadable, Readable, VecReadWrapper, VecWriteWrapper};
 use routing::router::{RouteHop, RouteParameters};
 
@@ -337,10 +337,10 @@ pub enum Event {
                /// payment route.
                ///
                /// Should be applied to the [`NetworkGraph`] so that routing decisions can take into
-               /// account the update. [`NetGraphMsgHandler`] is capable of doing this.
+               /// account the update. [`P2PGossipSync`] is capable of doing this.
                ///
-               /// [`NetworkGraph`]: crate::routing::network_graph::NetworkGraph
-               /// [`NetGraphMsgHandler`]: crate::routing::network_graph::NetGraphMsgHandler
+               /// [`NetworkGraph`]: crate::routing::gossip::NetworkGraph
+               /// [`P2PGossipSync`]: crate::routing::gossip::P2PGossipSync
                network_update: Option<NetworkUpdate>,
                /// For both single-path and multi-path payments, this is set if all paths of the payment have
                /// failed. This will be set to false if (1) this is an MPP payment and (2) other parts of the
@@ -430,7 +430,8 @@ pub enum Event {
                /// transaction.
                claim_from_onchain_tx: bool,
        },
-       /// Used to indicate that a channel with the given `channel_id` is in the process of closure.
+       /// Used to indicate that a previously opened channel with the given `channel_id` is in the
+       /// process of closure.
        ChannelClosed  {
                /// The channel_id of the channel which has been closed. Note that on-chain transactions
                /// resolving the channel are likely still awaiting confirmation.
@@ -499,6 +500,12 @@ pub enum Event {
                /// the resulting [`ChannelManager`] will not be readable by versions of LDK prior to
                /// 0.0.106.
                ///
+               /// Furthermore, note that if [`ChannelTypeFeatures::supports_zero_conf`] returns true on this type,
+               /// the resulting [`ChannelManager`] will not be readable by versions of LDK prior to
+               /// 0.0.107. Channels setting this type also need to get manually accepted via
+               /// [`crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`],
+               /// or will be rejected otherwise.
+               ///
                /// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
                channel_type: ChannelTypeFeatures,
        },
@@ -902,12 +909,12 @@ pub enum MessageSendEvent {
                /// The message which should be sent.
                msg: msgs::FundingSigned,
        },
-       /// Used to indicate that a funding_locked message should be sent to the peer with the given node_id.
-       SendFundingLocked {
+       /// Used to indicate that a channel_ready message should be sent to the peer with the given node_id.
+       SendChannelReady {
                /// The node_id of the node which should receive these message(s)
                node_id: PublicKey,
-               /// The funding_locked message which should be sent.
-               msg: msgs::FundingLocked,
+               /// The channel_ready message which should be sent.
+               msg: msgs::ChannelReady,
        },
        /// Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id.
        SendAnnouncementSignatures {