@@ -275,11 +275,6 @@ pub(crate) enum HTLCSource {
275
275
first_hop_htlc_msat : u64 ,
276
276
payment_id : PaymentId ,
277
277
payment_secret : Option < PaymentSecret > ,
278
- /// Note that this is now "deprecated" - we write it for forwards (and read it for
279
- /// backwards) compatibility reasons, but prefer to use the data in the
280
- /// [`super::outbound_payment`] module, which stores per-payment data once instead of in
281
- /// each HTLC.
282
- payment_params : Option < PaymentParameters > ,
283
278
} ,
284
279
}
285
280
#[ allow( clippy:: derive_hash_xor_eq) ] // Our Hash is faithful to the data, we just don't have SecretKey::hash
@@ -290,14 +285,13 @@ impl core::hash::Hash for HTLCSource {
290
285
0u8 . hash ( hasher) ;
291
286
prev_hop_data. hash ( hasher) ;
292
287
} ,
293
- HTLCSource :: OutboundRoute { path, session_priv, payment_id, payment_secret, first_hop_htlc_msat, payment_params } => {
288
+ HTLCSource :: OutboundRoute { path, session_priv, payment_id, payment_secret, first_hop_htlc_msat } => {
294
289
1u8 . hash ( hasher) ;
295
290
path. hash ( hasher) ;
296
291
session_priv[ ..] . hash ( hasher) ;
297
292
payment_id. hash ( hasher) ;
298
293
payment_secret. hash ( hasher) ;
299
294
first_hop_htlc_msat. hash ( hasher) ;
300
- payment_params. hash ( hasher) ;
301
295
} ,
302
296
}
303
297
}
@@ -312,7 +306,6 @@ impl HTLCSource {
312
306
first_hop_htlc_msat : 0 ,
313
307
payment_id : PaymentId ( [ 2 ; 32 ] ) ,
314
308
payment_secret : None ,
315
- payment_params : None ,
316
309
}
317
310
}
318
311
}
@@ -2511,7 +2504,6 @@ where
2511
2504
first_hop_htlc_msat : htlc_msat,
2512
2505
payment_id,
2513
2506
payment_secret : payment_secret. clone ( ) ,
2514
- payment_params : payment_params. clone ( ) ,
2515
2507
} , onion_packet, & self . logger ) ;
2516
2508
match break_chan_entry ! ( self , send_res, chan) {
2517
2509
Some ( monitor_update) => {
@@ -6858,7 +6850,6 @@ impl Readable for HTLCSource {
6858
6850
path,
6859
6851
payment_id : payment_id. unwrap ( ) ,
6860
6852
payment_secret,
6861
- payment_params,
6862
6853
} )
6863
6854
}
6864
6855
1 => Ok ( HTLCSource :: PreviousHopData ( Readable :: read ( reader) ?) ) ,
@@ -6870,7 +6861,7 @@ impl Readable for HTLCSource {
6870
6861
impl Writeable for HTLCSource {
6871
6862
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , crate :: io:: Error > {
6872
6863
match self {
6873
- HTLCSource :: OutboundRoute { ref session_priv, ref first_hop_htlc_msat, ref path, payment_id, payment_secret, payment_params } => {
6864
+ HTLCSource :: OutboundRoute { ref session_priv, ref first_hop_htlc_msat, ref path, payment_id, payment_secret } => {
6874
6865
0u8 . write ( writer) ?;
6875
6866
let payment_id_opt = Some ( payment_id) ;
6876
6867
write_tlv_fields ! ( writer, {
@@ -6879,7 +6870,7 @@ impl Writeable for HTLCSource {
6879
6870
( 2 , first_hop_htlc_msat, required) ,
6880
6871
( 3 , payment_secret, option) ,
6881
6872
( 4 , * path, vec_type) ,
6882
- ( 5 , payment_params , option) ,
6873
+ ( 5 , None :: < PaymentParameters > , option) , // payment_params in LDK versions prior to 0.0.115
6883
6874
} ) ;
6884
6875
}
6885
6876
HTLCSource :: PreviousHopData ( ref field) => {
0 commit comments