diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs index 0b549ca5926..d60741899d6 100644 --- a/lightning/src/events/mod.rs +++ b/lightning/src/events/mod.rs @@ -97,13 +97,13 @@ pub struct ClaimedHTLC { /// The block height at which this HTLC expires. pub cltv_expiry: u32, /// The amount (in msats) of this part of an MPP. - pub value: u64, + pub value_msat: u64, } impl_writeable_tlv_based!(ClaimedHTLC, { (0, channel_id, required), (2, user_channel_id, required), (4, cltv_expiry, required), - (6, value, required), + (6, value_msat, required), }); /// When the payment path failure took place and extra details about it. [`PathFailure::OnPath`] may diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index a31f54981fe..5ad5549dc68 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -228,7 +228,7 @@ impl From<&ClaimableHTLC> for events::ClaimedHTLC { channel_id: val.prev_hop.outpoint.to_channel_id(), user_channel_id: val.prev_hop.user_channel_id.unwrap_or(0), cltv_expiry: val.cltv_expiry, - value: val.value, + value_msat: val.value, } } } diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index 0a98276d525..73d09c76f9f 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -2299,7 +2299,7 @@ pub fn pass_claimed_payment_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, ' } => { assert_eq!(preimage, our_payment_preimage); assert_eq!(htlcs.len(), expected_paths.len()); // One per path. - assert_eq!(htlcs.iter().map(|h| h.value).sum::(), amount_msat); + assert_eq!(htlcs.iter().map(|h| h.value_msat).sum::(), amount_msat); expected_paths.iter().zip(htlcs).for_each(|(path, htlc)| check_claimed_htlc_channel(origin_node, path, htlc)); }, Event::PaymentClaimed { @@ -2311,7 +2311,7 @@ pub fn pass_claimed_payment_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, ' } => { assert_eq!(&payment_hash.0, &Sha256::hash(&our_payment_preimage.0)[..]); assert_eq!(htlcs.len(), expected_paths.len()); // One per path. - assert_eq!(htlcs.iter().map(|h| h.value).sum::(), amount_msat); + assert_eq!(htlcs.iter().map(|h| h.value_msat).sum::(), amount_msat); expected_paths.iter().zip(htlcs).for_each(|(path, htlc)| check_claimed_htlc_channel(origin_node, path, htlc)); } _ => panic!(),