@@ -756,23 +756,20 @@ where
756
756
self . scorer . lock ( ) . payment_path_failed ( & path, * short_channel_id) ;
757
757
}
758
758
759
+ self . remove_path_inflight_htlcs ( * payment_hash, path) ;
759
760
if payment_id. is_none ( ) {
760
761
log_trace ! ( self . logger, "Payment {} has no id; not retrying" , log_bytes!( payment_hash. 0 ) ) ;
761
- self . remove_path_inflight_htlcs ( * payment_hash, path) ;
762
762
} else if * rejected_by_dest {
763
763
log_trace ! ( self . logger, "Payment {} rejected by destination; not retrying" , log_bytes!( payment_hash. 0 ) ) ;
764
764
self . payer . abandon_payment ( payment_id. unwrap ( ) ) ;
765
- self . remove_path_inflight_htlcs ( * payment_hash, path) ;
766
765
} else if retry. is_none ( ) {
767
766
log_trace ! ( self . logger, "Payment {} missing retry params; not retrying" , log_bytes!( payment_hash. 0 ) ) ;
768
767
self . payer . abandon_payment ( payment_id. unwrap ( ) ) ;
769
- self . remove_path_inflight_htlcs ( * payment_hash, path) ;
770
768
} else if self . retry_payment ( payment_id. unwrap ( ) , * payment_hash, retry. as_ref ( ) . unwrap ( ) ) . is_ok ( ) {
771
769
// We retried at least somewhat, don't provide the PaymentPathFailed event to the user.
772
770
return ;
773
771
} else {
774
772
self . payer . abandon_payment ( payment_id. unwrap ( ) ) ;
775
- self . remove_path_inflight_htlcs ( * payment_hash, path) ;
776
773
}
777
774
} ,
778
775
Event :: PaymentFailed { payment_hash, .. } => {
0 commit comments