File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,8 @@ pub enum Event {
498
498
payment_id : PaymentId ,
499
499
/// The hash that was given to [`ChannelManager::send_payment`].
500
500
///
501
+ /// This will be `Some` for all payments which completed on LDK 0.0.104 or later.
502
+ ///
501
503
/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
502
504
payment_hash : Option < PaymentHash > ,
503
505
/// The payment path that was successful.
@@ -518,6 +520,8 @@ pub enum Event {
518
520
PaymentPathFailed {
519
521
/// The `payment_id` passed to [`ChannelManager::send_payment`].
520
522
///
523
+ /// This will be `Some` for all payment paths which failed on LDK 0.0.103 or later.
524
+ ///
521
525
/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
522
526
/// [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
523
527
payment_id : Option < PaymentId > ,
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ pub(crate) enum PendingOutboundPayment {
60
60
/// and add a pending payment that was already fulfilled.
61
61
Fulfilled {
62
62
session_privs : HashSet < [ u8 ; 32 ] > ,
63
+ /// Filled in for any payment which moved to `Fulfilled` on LDK 0.0.104 or later.
63
64
payment_hash : Option < PaymentHash > ,
64
65
timer_ticks_without_htlcs : u8 ,
65
66
} ,
@@ -1168,9 +1169,11 @@ impl OutboundPayments {
1168
1169
if let hash_map:: Entry :: Occupied ( mut payment) = outbounds. entry ( payment_id) {
1169
1170
assert ! ( payment. get( ) . is_fulfilled( ) ) ;
1170
1171
if payment. get_mut ( ) . remove ( & session_priv_bytes, None ) {
1172
+ let payment_hash = payment. get ( ) . payment_hash ( ) ;
1173
+ debug_assert ! ( payment_hash. is_some( ) ) ;
1171
1174
pending_events. push_back ( ( events:: Event :: PaymentPathSuccessful {
1172
1175
payment_id,
1173
- payment_hash : payment . get ( ) . payment_hash ( ) ,
1176
+ payment_hash,
1174
1177
path,
1175
1178
} , None ) ) ;
1176
1179
}
You can’t perform that action at this time.
0 commit comments