@@ -45,7 +45,7 @@ use crate::ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, No
4545#[ cfg( any( feature = "_test_utils" , test) ) ]
4646use crate :: ln:: features:: InvoiceFeatures ;
4747use 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 } ;
4949use crate :: routing:: scoring:: { ProbabilisticScorer , ProbabilisticScoringFeeParameters } ;
5050use crate :: ln:: msgs;
5151use crate :: ln:: onion_utils;
@@ -3170,6 +3170,7 @@ where
31703170 /// irrevocably committed to on our end. In such a case, do NOT retry the payment with a
31713171 /// different route unless you intend to pay twice!
31723172 ///
3173+ /// [`RouteHop`]: crate::routing::router::RouteHop
31733174 /// [`Event::PaymentSent`]: events::Event::PaymentSent
31743175 /// [`Event::PaymentFailed`]: events::Event::PaymentFailed
31753176 /// [`UpdateHTLCs`]: events::MessageSendEvent::UpdateHTLCs
@@ -7442,7 +7443,7 @@ impl Readable for ChannelDetails {
74427443}
74437444
74447445impl_writeable_tlv_based ! ( PhantomRouteHints , {
7445- ( 2 , channels, vec_type ) ,
7446+ ( 2 , channels, required_vec ) ,
74467447 ( 4 , phantom_scid, required) ,
74477448 ( 6 , real_node_pubkey, required) ,
74487449} ) ;
@@ -7634,15 +7635,15 @@ impl Readable for HTLCSource {
76347635 0 => {
76357636 let mut session_priv: crate :: util:: ser:: RequiredWrapper < SecretKey > = crate :: util:: ser:: RequiredWrapper ( None ) ;
76367637 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 ( ) ;
76387639 let mut payment_id = None ;
76397640 let mut payment_params: Option < PaymentParameters > = None ;
76407641 let mut blinded_tail: Option < BlindedTail > = None ;
76417642 read_tlv_fields ! ( reader, {
76427643 ( 0 , session_priv, required) ,
76437644 ( 1 , payment_id, option) ,
76447645 ( 2 , first_hop_htlc_msat, required) ,
7645- ( 4 , path_hops, vec_type ) ,
7646+ ( 4 , path_hops, required_vec ) ,
76467647 ( 5 , payment_params, ( option: ReadableArgs , 0 ) ) ,
76477648 ( 6 , blinded_tail, option) ,
76487649 } ) ;
@@ -7651,7 +7652,7 @@ impl Readable for HTLCSource {
76517652 // instead.
76527653 payment_id = Some ( PaymentId ( * session_priv. 0 . unwrap ( ) . as_ref ( ) ) ) ;
76537654 }
7654- let path = Path { hops : path_hops. ok_or ( DecodeError :: InvalidValue ) ? , blinded_tail } ;
7655+ let path = Path { hops : path_hops, blinded_tail } ;
76557656 if path. hops . len ( ) == 0 {
76567657 return Err ( DecodeError :: InvalidValue ) ;
76577658 }
@@ -7686,7 +7687,7 @@ impl Writeable for HTLCSource {
76867687 ( 1 , payment_id_opt, option) ,
76877688 ( 2 , first_hop_htlc_msat, required) ,
76887689 // 3 was previously used to write a PaymentSecret for the payment.
7689- ( 4 , path. hops, vec_type ) ,
7690+ ( 4 , path. hops, required_vec ) ,
76907691 ( 5 , None :: <PaymentParameters >, option) , // payment_params in LDK versions prior to 0.0.115
76917692 ( 6 , path. blinded_tail, option) ,
76927693 } ) ;
@@ -7936,7 +7937,7 @@ where
79367937 ( 6 , monitor_update_blocked_actions_per_peer, option) ,
79377938 ( 7 , self . fake_scid_rand_bytes, required) ,
79387939 ( 8 , if events_not_backwards_compatible { Some ( & * events) } else { None } , option) ,
7939- ( 9 , htlc_purposes, vec_type ) ,
7940+ ( 9 , htlc_purposes, required_vec ) ,
79407941 ( 10 , in_flight_monitor_updates, option) ,
79417942 ( 11 , self . probing_cookie_secret, required) ,
79427943 ( 13 , htlc_onion_fields, optional_vec) ,
@@ -8375,7 +8376,7 @@ where
83758376 ( 6 , monitor_update_blocked_actions_per_peer, option) ,
83768377 ( 7 , fake_scid_rand_bytes, option) ,
83778378 ( 8 , events_override, option) ,
8378- ( 9 , claimable_htlc_purposes, vec_type ) ,
8379+ ( 9 , claimable_htlc_purposes, optional_vec ) ,
83798380 ( 10 , in_flight_monitor_updates, option) ,
83808381 ( 11 , probing_cookie_secret, option) ,
83818382 ( 13 , claimable_htlc_onion_fields, optional_vec) ,
0 commit comments