@@ -711,6 +711,11 @@ pub struct PaymentParameters {
711
711
/// payment to fail. Future attempts for the same payment shouldn't be relayed through any of
712
712
/// these SCIDs.
713
713
pub previously_failed_channels : Vec < u64 > ,
714
+
715
+ /// A list of indices corresponding to blinded paths in [`Payee::Blinded::route_hints`] which this
716
+ /// payment was previously attempted over and which caused the payment to fail. Future attempts
717
+ /// for the same payment shouldn't be relayed through any of these blinded paths.
718
+ pub previously_failed_blinded_path_idxs : Vec < u64 > ,
714
719
}
715
720
716
721
impl Writeable for PaymentParameters {
@@ -732,6 +737,7 @@ impl Writeable for PaymentParameters {
732
737
( 7 , self . previously_failed_channels, required_vec) ,
733
738
( 8 , * blinded_hints, optional_vec) ,
734
739
( 9 , self . payee. final_cltv_expiry_delta( ) , option) ,
740
+ ( 11 , self . previously_failed_blinded_path_idxs, required_vec) ,
735
741
} ) ;
736
742
Ok ( ( ) )
737
743
}
@@ -750,6 +756,7 @@ impl ReadableArgs<u32> for PaymentParameters {
750
756
( 7 , previously_failed_channels, optional_vec) ,
751
757
( 8 , blinded_route_hints, optional_vec) ,
752
758
( 9 , final_cltv_expiry_delta, ( default_value, default_final_cltv_expiry_delta) ) ,
759
+ ( 11 , previously_failed_blinded_path_idxs, optional_vec) ,
753
760
} ) ;
754
761
let blinded_route_hints = blinded_route_hints. unwrap_or ( vec ! [ ] ) ;
755
762
let payee = if blinded_route_hints. len ( ) != 0 {
@@ -773,6 +780,7 @@ impl ReadableArgs<u32> for PaymentParameters {
773
780
max_channel_saturation_power_of_half : _init_tlv_based_struct_field ! ( max_channel_saturation_power_of_half, ( default_value, unused) ) ,
774
781
expiry_time,
775
782
previously_failed_channels : previously_failed_channels. unwrap_or ( Vec :: new ( ) ) ,
783
+ previously_failed_blinded_path_idxs : previously_failed_blinded_path_idxs. unwrap_or ( Vec :: new ( ) ) ,
776
784
} )
777
785
}
778
786
}
@@ -791,6 +799,7 @@ impl PaymentParameters {
791
799
max_path_count : DEFAULT_MAX_PATH_COUNT ,
792
800
max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
793
801
previously_failed_channels : Vec :: new ( ) ,
802
+ previously_failed_blinded_path_idxs : Vec :: new ( ) ,
794
803
}
795
804
}
796
805
@@ -829,6 +838,7 @@ impl PaymentParameters {
829
838
max_path_count : DEFAULT_MAX_PATH_COUNT ,
830
839
max_channel_saturation_power_of_half : DEFAULT_MAX_CHANNEL_SATURATION_POW_HALF ,
831
840
previously_failed_channels : Vec :: new ( ) ,
841
+ previously_failed_blinded_path_idxs : Vec :: new ( ) ,
832
842
}
833
843
}
834
844
0 commit comments