projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2395 from wpaulino/phantom-deduped-forward-event
[rust-lightning]
/
lightning
/
src
/
events
/
mod.rs
diff --git
a/lightning/src/events/mod.rs
b/lightning/src/events/mod.rs
index 3fe17475fff490357283b1198e694ff104973f0d..a6601e4d99c21653ee991614d6662fefba92176b 100644
(file)
--- a/
lightning/src/events/mod.rs
+++ b/
lightning/src/events/mod.rs
@@
-14,10
+14,8
@@
//! future, as well as generate and broadcast funding transactions handle payment preimages and a
//! few other things.
//! future, as well as generate and broadcast funding transactions handle payment preimages and a
//! few other things.
-#[cfg(anchors)]
pub mod bump_transaction;
pub mod bump_transaction;
-#[cfg(anchors)]
pub use bump_transaction::BumpTransactionEvent;
use crate::sign::SpendableOutputDescriptor;
pub use bump_transaction::BumpTransactionEvent;
use crate::sign::SpendableOutputDescriptor;
@@
-33,8
+31,6
@@
use crate::util::string::UntrustedString;
use crate::routing::router::{BlindedTail, Path, RouteHop, RouteParameters};
use bitcoin::{PackedLockTime, Transaction, OutPoint};
use crate::routing::router::{BlindedTail, Path, RouteHop, RouteParameters};
use bitcoin::{PackedLockTime, Transaction, OutPoint};
-#[cfg(anchors)]
-use bitcoin::{Txid, TxIn, TxOut, Witness};
use bitcoin::blockdata::script::Script;
use bitcoin::hashes::Hash;
use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::blockdata::script::Script;
use bitcoin::hashes::Hash;
use bitcoin::hashes::sha256::Hash as Sha256;
@@
-834,12
+830,14
@@
pub enum Event {
/// Destination of the HTLC that failed to be processed.
failed_next_destination: HTLCDestination,
},
/// Destination of the HTLC that failed to be processed.
failed_next_destination: HTLCDestination,
},
- #[cfg(anchors)]
/// Indicates that a transaction originating from LDK needs to have its fee bumped. This event
/// requires confirmed external funds to be readily available to spend.
///
/// Indicates that a transaction originating from LDK needs to have its fee bumped. This event
/// requires confirmed external funds to be readily available to spend.
///
- /// LDK does not currently generate this event. It is limited to the scope of channels with
- /// anchor outputs, which will be introduced in a future release.
+ /// LDK does not currently generate this event unless the
+ /// [`ChannelHandshakeConfig::negotiate_anchors_zero_fee_htlc_tx`] config flag is set to true.
+ /// It is limited to the scope of channels with anchor outputs.
+ ///
+ /// [`ChannelHandshakeConfig::negotiate_anchors_zero_fee_htlc_tx`]: crate::util::config::ChannelHandshakeConfig::negotiate_anchors_zero_fee_htlc_tx
BumpTransaction(BumpTransactionEvent),
}
BumpTransaction(BumpTransactionEvent),
}
@@
-876,7
+874,7
@@
impl Writeable for Event {
(3, via_channel_id, option),
(4, amount_msat, required),
(5, via_user_channel_id, option),
(3, via_channel_id, option),
(4, amount_msat, required),
(5, via_user_channel_id, option),
-
(6, 0u64, required), // user_payment_id required for compatibility with
0.0.103 and earlier
+
// Type 6 was `user_payment_id` on
0.0.103 and earlier
(7, claim_deadline, option),
(8, payment_preimage, option),
(9, onion_fields, option),
(7, claim_deadline, option),
(8, payment_preimage, option),
(9, onion_fields, option),
@@
-1031,7
+1029,6
@@
impl Writeable for Event {
(2, failed_next_destination, required),
})
},
(2, failed_next_destination, required),
})
},
- #[cfg(anchors)]
&Event::BumpTransaction(ref event)=> {
27u8.write(writer)?;
match event {
&Event::BumpTransaction(ref event)=> {
27u8.write(writer)?;
match event {
@@
-1082,7
+1079,7
@@
impl MaybeReadable for Event {
let mut amount_msat = 0;
let mut counterparty_skimmed_fee_msat_opt = None;
let mut receiver_node_id = None;
let mut amount_msat = 0;
let mut counterparty_skimmed_fee_msat_opt = None;
let mut receiver_node_id = None;
- let mut _user_payment_id = None::<u64>; //
For compatibility with 0.0.103 and earlier
+ let mut _user_payment_id = None::<u64>; //
Used in 0.0.103 and earlier, no longer written in 0.0.116+.
let mut via_channel_id = None;
let mut claim_deadline = None;
let mut via_user_channel_id = None;
let mut via_channel_id = None;
let mut claim_deadline = None;
let mut via_user_channel_id = None;