//! future, as well as generate and broadcast funding transactions handle payment preimages and a
//! few other things.
-#[cfg(anchors)]
pub mod bump_transaction;
-#[cfg(anchors)]
pub use bump_transaction::BumpTransactionEvent;
use crate::sign::SpendableOutputDescriptor;
/// 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.
///
- /// 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),
}
(2, payment_failed_permanently, required),
(3, false, required), // all_paths_failed in LDK versions prior to 0.0.114
(4, path.blinded_tail, option),
- (5, path.hops, vec_type),
+ (5, path.hops, required_vec),
(7, short_channel_id, option),
(9, None::<RouteParameters>, option), // retry in LDK versions prior to 0.0.115
(11, payment_id, option),
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, option),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, path.blinded_tail, option),
})
},
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, path.blinded_tail, option),
})
},
write_tlv_fields!(writer, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path.hops, vec_type),
+ (4, path.hops, required_vec),
(6, short_channel_id, option),
(8, path.blinded_tail, option),
})
(2, failed_next_destination, required),
})
},
- #[cfg(anchors)]
&Event::BumpTransaction(ref event)=> {
27u8.write(writer)?;
match event {
(1, network_update, upgradable_option),
(2, payment_failed_permanently, required),
(4, blinded_tail, option),
- (5, path, vec_type),
+ // Added as a part of LDK 0.0.101 and always filled in since.
+ // Defaults to an empty Vec, though likely should have been `Option`al.
+ (5, path, optional_vec),
(7, short_channel_id, option),
(11, payment_id, option),
(13, failure_opt, upgradable_option),
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, option),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, blinded_tail, option),
});
Ok(Some(Event::PaymentPathSuccessful {
payment_id: payment_id.0.unwrap(),
payment_hash,
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
}))
};
f()
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, blinded_tail, option),
});
Ok(Some(Event::ProbeSuccessful {
payment_id: payment_id.0.unwrap(),
payment_hash: payment_hash.0.unwrap(),
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
}))
};
f()
_init_and_read_tlv_fields!(reader, {
(0, payment_id, required),
(2, payment_hash, required),
- (4, path, vec_type),
+ (4, path, required_vec),
(6, short_channel_id, option),
(8, blinded_tail, option),
});
Ok(Some(Event::ProbeFailed {
payment_id: payment_id.0.unwrap(),
payment_hash: payment_hash.0.unwrap(),
- path: Path { hops: path.unwrap(), blinded_tail },
+ path: Path { hops: path, blinded_tail },
short_channel_id,
}))
};