payment_id: PaymentId,
/// The hash that was given to [`ChannelManager::send_payment`].
///
+ /// This will be `Some` for all payments which completed on LDK 0.0.104 or later.
+ ///
/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
payment_hash: Option<PaymentHash>,
/// The payment path that was successful.
/// and add a pending payment that was already fulfilled.
Fulfilled {
session_privs: HashSet<[u8; 32]>,
+ /// Filled in for any payment which moved to `Fulfilled` on LDK 0.0.104 or later.
payment_hash: Option<PaymentHash>,
timer_ticks_without_htlcs: u8,
},
if let hash_map::Entry::Occupied(mut payment) = outbounds.entry(payment_id) {
assert!(payment.get().is_fulfilled());
if payment.get_mut().remove(&session_priv_bytes, None) {
+ let payment_hash = payment.get().payment_hash();
+ debug_assert!(payment_hash.is_some());
pending_events.push_back((events::Event::PaymentPathSuccessful {
payment_id,
- payment_hash: payment.get().payment_hash(),
+ payment_hash,
path,
}, None));
}