Skip to content

Commit ec1bd27

Browse files
committed
Rename value to value_msat.
1 parent 89808b3 commit ec1bd27

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lightning/src/events/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ pub struct ClaimedHTLC {
9797
/// The block height at which this HTLC expires.
9898
pub cltv_expiry: u32,
9999
/// The amount (in msats) of this part of an MPP.
100-
pub value: u64,
100+
pub value_msat: u64,
101101
}
102102
impl_writeable_tlv_based!(ClaimedHTLC, {
103103
(0, channel_id, required),
104104
(2, user_channel_id, required),
105105
(4, cltv_expiry, required),
106-
(6, value, required),
106+
(6, value_msat, required),
107107
});
108108

109109
/// When the payment path failure took place and extra details about it. [`PathFailure::OnPath`] may

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl From<&ClaimableHTLC> for events::ClaimedHTLC {
228228
channel_id: val.prev_hop.outpoint.to_channel_id(),
229229
user_channel_id: val.prev_hop.user_channel_id.unwrap_or(0),
230230
cltv_expiry: val.cltv_expiry,
231-
value: val.value,
231+
value_msat: val.value,
232232
}
233233
}
234234
}

lightning/src/ln/functional_test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ pub fn pass_claimed_payment_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, '
22992299
} => {
23002300
assert_eq!(preimage, our_payment_preimage);
23012301
assert_eq!(htlcs.len(), expected_paths.len()); // One per path.
2302-
assert_eq!(htlcs.iter().map(|h| h.value).sum::<u64>(), amount_msat);
2302+
assert_eq!(htlcs.iter().map(|h| h.value_msat).sum::<u64>(), amount_msat);
23032303
expected_paths.iter().zip(htlcs).for_each(|(path, htlc)| check_claimed_htlc_channel(origin_node, path, htlc));
23042304
},
23052305
Event::PaymentClaimed {
@@ -2311,7 +2311,7 @@ pub fn pass_claimed_payment_along_route<'a, 'b, 'c>(origin_node: &Node<'a, 'b, '
23112311
} => {
23122312
assert_eq!(&payment_hash.0, &Sha256::hash(&our_payment_preimage.0)[..]);
23132313
assert_eq!(htlcs.len(), expected_paths.len()); // One per path.
2314-
assert_eq!(htlcs.iter().map(|h| h.value).sum::<u64>(), amount_msat);
2314+
assert_eq!(htlcs.iter().map(|h| h.value_msat).sum::<u64>(), amount_msat);
23152315
expected_paths.iter().zip(htlcs).for_each(|(path, htlc)| check_claimed_htlc_channel(origin_node, path, htlc));
23162316
}
23172317
_ => panic!(),

0 commit comments

Comments
 (0)