@@ -191,9 +191,9 @@ struct ClaimableHTLC {
191
191
cltv_expiry : u32 ,
192
192
/// The amount (in msats) of this MPP part
193
193
value : u64 ,
194
- /// The amount (in msats) that the sender intended to be sent (used for
195
- /// validating total MPP amount)
196
- intended_value : u64 ,
194
+ /// The amount (in msats) that the sender intended to be sent in this MPP
195
+ /// part (used for validating total MPP amount)
196
+ sender_intended_value : u64 ,
197
197
onion_payload : OnionPayload ,
198
198
timer_ticks : u8 ,
199
199
/// The sum total of all MPP parts
@@ -3261,7 +3261,7 @@ where
3261
3261
// if possible so that we don't prematurely mark MPP payments complete
3262
3262
// if routing nodes overpay
3263
3263
value : incoming_amt_msat. unwrap_or ( outgoing_amt_msat) ,
3264
- intended_value : outgoing_amt_msat,
3264
+ sender_intended_value : outgoing_amt_msat,
3265
3265
timer_ticks : 0 ,
3266
3266
total_msat : if let Some ( data) = & payment_data { data. total_msat } else { outgoing_amt_msat } ,
3267
3267
cltv_expiry,
@@ -3316,9 +3316,9 @@ where
3316
3316
continue
3317
3317
}
3318
3318
}
3319
- let mut total_value = claimable_htlc. intended_value ;
3319
+ let mut total_value = claimable_htlc. sender_intended_value ;
3320
3320
for htlc in htlcs. iter( ) {
3321
- total_value += htlc. intended_value ;
3321
+ total_value += htlc. sender_intended_value ;
3322
3322
match & htlc. onion_payload {
3323
3323
OnionPayload :: Invoice { .. } => {
3324
3324
if htlc. total_msat != $payment_data. total_msat {
@@ -3333,7 +3333,7 @@ where
3333
3333
}
3334
3334
if total_value >= msgs:: MAX_VALUE_MSAT {
3335
3335
fail_htlc!( claimable_htlc, payment_hash) ;
3336
- } else if total_value - claimable_htlc. intended_value >= $payment_data. total_msat {
3336
+ } else if total_value - claimable_htlc. sender_intended_value >= $payment_data. total_msat {
3337
3337
log_trace!( self . logger, "Failing HTLC with payment_hash {} as payment is already claimable" ,
3338
3338
log_bytes!( payment_hash. 0 ) ) ;
3339
3339
fail_htlc!( claimable_htlc, payment_hash) ;
@@ -6775,7 +6775,7 @@ impl Writeable for ClaimableHTLC {
6775
6775
( 0 , self . prev_hop, required) ,
6776
6776
( 1 , self . total_msat, required) ,
6777
6777
( 2 , self . value, required) ,
6778
- ( 3 , self . intended_value , required) ,
6778
+ ( 3 , self . sender_intended_value , required) ,
6779
6779
( 4 , payment_data, option) ,
6780
6780
( 6 , self . cltv_expiry, required) ,
6781
6781
( 8 , keysend_preimage, option) ,
@@ -6788,7 +6788,7 @@ impl Readable for ClaimableHTLC {
6788
6788
fn read < R : Read > ( reader : & mut R ) -> Result < Self , DecodeError > {
6789
6789
let mut prev_hop = crate :: util:: ser:: RequiredWrapper ( None ) ;
6790
6790
let mut value = 0 ;
6791
- let mut intended_value = None ;
6791
+ let mut sender_intended_value = None ;
6792
6792
let mut payment_data: Option < msgs:: FinalOnionHopData > = None ;
6793
6793
let mut cltv_expiry = 0 ;
6794
6794
let mut total_msat = None ;
@@ -6797,7 +6797,7 @@ impl Readable for ClaimableHTLC {
6797
6797
( 0 , prev_hop, required) ,
6798
6798
( 1 , total_msat, option) ,
6799
6799
( 2 , value, required) ,
6800
- ( 3 , intended_value , option) ,
6800
+ ( 3 , sender_intended_value , option) ,
6801
6801
( 4 , payment_data, option) ,
6802
6802
( 6 , cltv_expiry, required) ,
6803
6803
( 8 , keysend_preimage, option)
@@ -6826,7 +6826,7 @@ impl Readable for ClaimableHTLC {
6826
6826
prev_hop : prev_hop. 0 . unwrap ( ) ,
6827
6827
timer_ticks : 0 ,
6828
6828
value,
6829
- intended_value : intended_value . unwrap_or ( value) ,
6829
+ sender_intended_value : sender_intended_value . unwrap_or ( value) ,
6830
6830
total_msat : total_msat. unwrap ( ) ,
6831
6831
onion_payload,
6832
6832
cltv_expiry,
0 commit comments