X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fevents%2Fmod.rs;h=32192297432d1873c6898e79ccf41f8b66ada62a;hb=b6f3d0a5fa6cf6036d317d3ff47e5252be47bc40;hp=c8c736c1f713db79a72336fbb44b2ba0ae76abea;hpb=989304ed3623a578dc9ad0d9aac0984da0d43584;p=rust-lightning diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs index c8c736c1..32192297 100644 --- a/lightning/src/events/mod.rs +++ b/lightning/src/events/mod.rs @@ -514,10 +514,13 @@ pub enum Event { sender_intended_total_msat: Option, }, /// Indicates a request for an invoice failed to yield a response in a reasonable amount of time - /// or was explicitly abandoned by [`ChannelManager::abandon_payment`]. + /// or was explicitly abandoned by [`ChannelManager::abandon_payment`]. This may be for an + /// [`InvoiceRequest`] sent for an [`Offer`] or for a [`Refund`] that hasn't been redeemed. /// /// [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment - #[cfg(invreqfailed)] + /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest + /// [`Offer`]: crate::offers::offer::Offer + /// [`Refund`]: crate::offers::refund::Refund InvoiceRequestFailed { /// The `payment_id` to have been associated with payment for the requested invoice. payment_id: PaymentId, @@ -1164,7 +1167,6 @@ impl Writeable for Event { (8, funding_txo, required), }); }, - #[cfg(invreqfailed)] &Event::InvoiceRequestFailed { ref payment_id } => { 33u8.write(writer)?; write_tlv_fields!(writer, { @@ -1558,7 +1560,6 @@ impl MaybeReadable for Event { }; f() }, - #[cfg(invreqfailed)] 33u8 => { let f = || { _init_and_read_len_prefixed_tlv_fields!(reader, { @@ -1846,12 +1847,6 @@ pub trait MessageSendEventsProvider { fn get_and_clear_pending_msg_events(&self) -> Vec; } -/// A trait indicating an object may generate onion messages to send -pub trait OnionMessageProvider { - /// Gets the next pending onion message for the peer with the given node id. - fn next_onion_message_for_peer(&self, peer_node_id: PublicKey) -> Option; -} - /// A trait indicating an object may generate events. /// /// Events are processed by passing an [`EventHandler`] to [`process_pending_events`].