@@ -247,11 +247,6 @@ pub(crate) enum HTLCSource {
247
247
first_hop_htlc_msat : u64 ,
248
248
payment_id : PaymentId ,
249
249
payment_secret : Option < PaymentSecret > ,
250
- /// Note that this is now "deprecated" - we write it for forwards (and read it for
251
- /// backwards) compatibility reasons, but prefer to use the data in the
252
- /// [`super::outbound_payment`] module, which stores per-payment data once instead of in
253
- /// each HTLC.
254
- payment_params : Option < PaymentParameters > ,
255
250
} ,
256
251
}
257
252
#[ allow( clippy:: derive_hash_xor_eq) ] // Our Hash is faithful to the data, we just don't have SecretKey::hash
@@ -262,14 +257,13 @@ impl core::hash::Hash for HTLCSource {
262
257
0u8 . hash ( hasher) ;
263
258
prev_hop_data. hash ( hasher) ;
264
259
} ,
265
- HTLCSource :: OutboundRoute { path, session_priv, payment_id, payment_secret, first_hop_htlc_msat, payment_params } => {
260
+ HTLCSource :: OutboundRoute { path, session_priv, payment_id, payment_secret, first_hop_htlc_msat } => {
266
261
1u8 . hash ( hasher) ;
267
262
path. hash ( hasher) ;
268
263
session_priv[ ..] . hash ( hasher) ;
269
264
payment_id. hash ( hasher) ;
270
265
payment_secret. hash ( hasher) ;
271
266
first_hop_htlc_msat. hash ( hasher) ;
272
- payment_params. hash ( hasher) ;
273
267
} ,
274
268
}
275
269
}
@@ -284,7 +278,6 @@ impl HTLCSource {
284
278
first_hop_htlc_msat : 0 ,
285
279
payment_id : PaymentId ( [ 2 ; 32 ] ) ,
286
280
payment_secret : None ,
287
- payment_params : None ,
288
281
}
289
282
}
290
283
}
@@ -2459,7 +2452,6 @@ where
2459
2452
first_hop_htlc_msat : htlc_msat,
2460
2453
payment_id,
2461
2454
payment_secret : payment_secret. clone ( ) ,
2462
- payment_params : payment_params. clone ( ) ,
2463
2455
} , onion_packet, & self . logger ) ;
2464
2456
match break_chan_entry ! ( self , send_res, chan) {
2465
2457
Some ( monitor_update) => {
@@ -6806,7 +6798,6 @@ impl Readable for HTLCSource {
6806
6798
path,
6807
6799
payment_id : payment_id. unwrap ( ) ,
6808
6800
payment_secret,
6809
- payment_params,
6810
6801
} )
6811
6802
}
6812
6803
1 => Ok ( HTLCSource :: PreviousHopData ( Readable :: read ( reader) ?) ) ,
@@ -6818,7 +6809,7 @@ impl Readable for HTLCSource {
6818
6809
impl Writeable for HTLCSource {
6819
6810
fn write < W : Writer > ( & self , writer : & mut W ) -> Result < ( ) , crate :: io:: Error > {
6820
6811
match self {
6821
- HTLCSource :: OutboundRoute { ref session_priv, ref first_hop_htlc_msat, ref path, payment_id, payment_secret, payment_params } => {
6812
+ HTLCSource :: OutboundRoute { ref session_priv, ref first_hop_htlc_msat, ref path, payment_id, payment_secret } => {
6822
6813
0u8 . write ( writer) ?;
6823
6814
let payment_id_opt = Some ( payment_id) ;
6824
6815
write_tlv_fields ! ( writer, {
@@ -6827,7 +6818,7 @@ impl Writeable for HTLCSource {
6827
6818
( 2 , first_hop_htlc_msat, required) ,
6828
6819
( 3 , payment_secret, option) ,
6829
6820
( 4 , * path, vec_type) ,
6830
- ( 5 , payment_params , option) ,
6821
+ ( 5 , None :: < PaymentParameters > , option) , // payment_params in LDK versions prior to 0.0.115
6831
6822
} ) ;
6832
6823
}
6833
6824
HTLCSource :: PreviousHopData ( ref field) => {
0 commit comments