@@ -2617,7 +2617,7 @@ where
2617
2617
}
2618
2618
2619
2619
fn construct_fwd_pending_htlc_info (
2620
- & self , msg : & msgs:: UpdateAddHTLC , hop_data : msgs:: InboundPayload , hop_hmac : [ u8 ; 32 ] ,
2620
+ & self , msg : & msgs:: UpdateAddHTLC , hop_data : msgs:: InboundOnionPayload , hop_hmac : [ u8 ; 32 ] ,
2621
2621
new_packet_bytes : [ u8 ; onion_utils:: ONION_DATA_LEN ] , shared_secret : [ u8 ; 32 ] ,
2622
2622
next_packet_pubkey_opt : Option < Result < PublicKey , secp256k1:: Error > >
2623
2623
) -> Result < PendingHTLCInfo , InboundOnionErr > {
@@ -2630,9 +2630,9 @@ where
2630
2630
} ;
2631
2631
2632
2632
let ( short_channel_id, amt_to_forward, outgoing_cltv_value) = match hop_data {
2633
- msgs:: InboundPayload :: Forward { short_channel_id, amt_to_forward, outgoing_cltv_value } =>
2633
+ msgs:: InboundOnionPayload :: Forward { short_channel_id, amt_to_forward, outgoing_cltv_value } =>
2634
2634
( short_channel_id, amt_to_forward, outgoing_cltv_value) ,
2635
- msgs:: InboundPayload :: Receive { .. } =>
2635
+ msgs:: InboundOnionPayload :: Receive { .. } =>
2636
2636
return Err ( InboundOnionErr {
2637
2637
msg : "Final Node OnionHopData provided for us as an intermediary node" ,
2638
2638
err_code : 0x4000 | 22 ,
@@ -2655,12 +2655,12 @@ where
2655
2655
}
2656
2656
2657
2657
fn construct_recv_pending_htlc_info (
2658
- & self , hop_data : msgs:: InboundPayload , shared_secret : [ u8 ; 32 ] , payment_hash : PaymentHash ,
2658
+ & self , hop_data : msgs:: InboundOnionPayload , shared_secret : [ u8 ; 32 ] , payment_hash : PaymentHash ,
2659
2659
amt_msat : u64 , cltv_expiry : u32 , phantom_shared_secret : Option < [ u8 ; 32 ] > , allow_underpay : bool ,
2660
2660
counterparty_skimmed_fee_msat : Option < u64 > ,
2661
2661
) -> Result < PendingHTLCInfo , InboundOnionErr > {
2662
2662
let ( payment_data, keysend_preimage, onion_amt_msat, outgoing_cltv_value, payment_metadata) = match hop_data {
2663
- msgs:: InboundPayload :: Receive {
2663
+ msgs:: InboundOnionPayload :: Receive {
2664
2664
payment_data, keysend_preimage, amt_msat, outgoing_cltv_value, payment_metadata, ..
2665
2665
} =>
2666
2666
( payment_data, keysend_preimage, amt_msat, outgoing_cltv_value, payment_metadata) ,
@@ -2819,7 +2819,7 @@ where
2819
2819
} ;
2820
2820
let ( outgoing_scid, outgoing_amt_msat, outgoing_cltv_value, next_packet_pk_opt) = match next_hop {
2821
2821
onion_utils:: Hop :: Forward {
2822
- next_hop_data : msgs:: InboundPayload :: Forward {
2822
+ next_hop_data : msgs:: InboundOnionPayload :: Forward {
2823
2823
short_channel_id, amt_to_forward, outgoing_cltv_value
2824
2824
} , ..
2825
2825
} => {
@@ -2830,7 +2830,7 @@ where
2830
2830
// We'll do receive checks in [`Self::construct_pending_htlc_info`] so we have access to the
2831
2831
// inbound channel's state.
2832
2832
onion_utils:: Hop :: Receive { .. } => return Ok ( ( next_hop, shared_secret, None ) ) ,
2833
- onion_utils:: Hop :: Forward { next_hop_data : msgs:: InboundPayload :: Receive { .. } , .. } => {
2833
+ onion_utils:: Hop :: Forward { next_hop_data : msgs:: InboundOnionPayload :: Receive { .. } , .. } => {
2834
2834
return_err ! ( "Final Node OnionHopData provided for us as an intermediary node" , 0x4000 | 22 , & [ 0 ; 0 ] ) ;
2835
2835
}
2836
2836
} ;
@@ -10020,7 +10020,7 @@ mod tests {
10020
10020
let node = create_network ( 1 , & node_cfg, & node_chanmgr) ;
10021
10021
let sender_intended_amt_msat = 100 ;
10022
10022
let extra_fee_msat = 10 ;
10023
- let hop_data = msgs:: InboundPayload :: Receive {
10023
+ let hop_data = msgs:: InboundOnionPayload :: Receive {
10024
10024
amt_msat : 100 ,
10025
10025
outgoing_cltv_value : 42 ,
10026
10026
payment_metadata : None ,
@@ -10039,7 +10039,7 @@ mod tests {
10039
10039
} else { panic ! ( ) ; }
10040
10040
10041
10041
// If amt_received + extra_fee is equal to the sender intended amount, we're fine.
10042
- let hop_data = msgs:: InboundPayload :: Receive { // This is the same payload as above, InboundPayload doesn't implement Clone
10042
+ let hop_data = msgs:: InboundOnionPayload :: Receive { // This is the same payload as above, InboundOnionPayload doesn't implement Clone
10043
10043
amt_msat : 100 ,
10044
10044
outgoing_cltv_value : 42 ,
10045
10045
payment_metadata : None ,
0 commit comments