@@ -45,7 +45,7 @@ use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, No
45
45
#[ cfg( any( feature = "_test_utils" , test) ) ]
46
46
use crate :: ln:: features:: InvoiceFeatures ;
47
47
use crate :: routing:: gossip:: NetworkGraph ;
48
- use crate :: routing:: router:: { BlindedTail , DefaultRouter , InFlightHtlcs , Path , Payee , PaymentParameters , Route , RouteHop , RouteParameters , Router } ;
48
+ use crate :: routing:: router:: { BlindedTail , DefaultRouter , InFlightHtlcs , Path , Payee , PaymentParameters , Route , RouteParameters , Router } ;
49
49
use crate :: routing:: scoring:: { ProbabilisticScorer , ProbabilisticScoringFeeParameters } ;
50
50
use crate :: ln:: msgs;
51
51
use crate :: ln:: onion_utils;
@@ -3170,6 +3170,7 @@ where
3170
3170
/// irrevocably committed to on our end. In such a case, do NOT retry the payment with a
3171
3171
/// different route unless you intend to pay twice!
3172
3172
///
3173
+ /// [`RouteHop`]: crate::routing::router::RouteHop
3173
3174
/// [`Event::PaymentSent`]: events::Event::PaymentSent
3174
3175
/// [`Event::PaymentFailed`]: events::Event::PaymentFailed
3175
3176
/// [`UpdateHTLCs`]: events::MessageSendEvent::UpdateHTLCs
@@ -7442,7 +7443,7 @@ impl Readable for ChannelDetails {
7442
7443
}
7443
7444
7444
7445
impl_writeable_tlv_based ! ( PhantomRouteHints , {
7445
- ( 2 , channels, vec_type ) ,
7446
+ ( 2 , channels, required_vec ) ,
7446
7447
( 4 , phantom_scid, required) ,
7447
7448
( 6 , real_node_pubkey, required) ,
7448
7449
} ) ;
@@ -7634,15 +7635,15 @@ impl Readable for HTLCSource {
7634
7635
0 => {
7635
7636
let mut session_priv: crate :: util:: ser:: RequiredWrapper < SecretKey > = crate :: util:: ser:: RequiredWrapper ( None ) ;
7636
7637
let mut first_hop_htlc_msat: u64 = 0 ;
7637
- let mut path_hops: Option < Vec < RouteHop > > = Some ( Vec :: new ( ) ) ;
7638
+ let mut path_hops = Vec :: new ( ) ;
7638
7639
let mut payment_id = None ;
7639
7640
let mut payment_params: Option < PaymentParameters > = None ;
7640
7641
let mut blinded_tail: Option < BlindedTail > = None ;
7641
7642
read_tlv_fields ! ( reader, {
7642
7643
( 0 , session_priv, required) ,
7643
7644
( 1 , payment_id, option) ,
7644
7645
( 2 , first_hop_htlc_msat, required) ,
7645
- ( 4 , path_hops, vec_type ) ,
7646
+ ( 4 , path_hops, required_vec ) ,
7646
7647
( 5 , payment_params, ( option: ReadableArgs , 0 ) ) ,
7647
7648
( 6 , blinded_tail, option) ,
7648
7649
} ) ;
@@ -7651,7 +7652,7 @@ impl Readable for HTLCSource {
7651
7652
// instead.
7652
7653
payment_id = Some ( PaymentId ( * session_priv. 0 . unwrap ( ) . as_ref ( ) ) ) ;
7653
7654
}
7654
- let path = Path { hops : path_hops. ok_or ( DecodeError :: InvalidValue ) ? , blinded_tail } ;
7655
+ let path = Path { hops : path_hops, blinded_tail } ;
7655
7656
if path. hops . len ( ) == 0 {
7656
7657
return Err ( DecodeError :: InvalidValue ) ;
7657
7658
}
@@ -7686,7 +7687,7 @@ impl Writeable for HTLCSource {
7686
7687
( 1 , payment_id_opt, option) ,
7687
7688
( 2 , first_hop_htlc_msat, required) ,
7688
7689
// 3 was previously used to write a PaymentSecret for the payment.
7689
- ( 4 , path. hops, vec_type ) ,
7690
+ ( 4 , path. hops, required_vec ) ,
7690
7691
( 5 , None :: <PaymentParameters >, option) , // payment_params in LDK versions prior to 0.0.115
7691
7692
( 6 , path. blinded_tail, option) ,
7692
7693
} ) ;
@@ -7936,7 +7937,7 @@ where
7936
7937
( 6 , monitor_update_blocked_actions_per_peer, option) ,
7937
7938
( 7 , self . fake_scid_rand_bytes, required) ,
7938
7939
( 8 , if events_not_backwards_compatible { Some ( & * events) } else { None } , option) ,
7939
- ( 9 , htlc_purposes, vec_type ) ,
7940
+ ( 9 , htlc_purposes, required_vec ) ,
7940
7941
( 10 , in_flight_monitor_updates, option) ,
7941
7942
( 11 , self . probing_cookie_secret, required) ,
7942
7943
( 13 , htlc_onion_fields, optional_vec) ,
@@ -8375,7 +8376,7 @@ where
8375
8376
( 6 , monitor_update_blocked_actions_per_peer, option) ,
8376
8377
( 7 , fake_scid_rand_bytes, option) ,
8377
8378
( 8 , events_override, option) ,
8378
- ( 9 , claimable_htlc_purposes, vec_type ) ,
8379
+ ( 9 , claimable_htlc_purposes, optional_vec ) ,
8379
8380
( 10 , in_flight_monitor_updates, option) ,
8380
8381
( 11 , probing_cookie_secret, option) ,
8381
8382
( 13 , claimable_htlc_onion_fields, optional_vec) ,
0 commit comments