Skip to content

Commit baf2dec

Browse files
committed
Specify amount units in HolderHTLCOutput
This is only a name change, there is no change in behavior.
1 parent d618bf1 commit baf2dec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/chain/package.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,31 +252,31 @@ impl_writeable_tlv_based!(CounterpartyReceivedHTLCOutput, {
252252
#[derive(Clone, PartialEq, Eq)]
253253
pub(crate) struct HolderHTLCOutput {
254254
preimage: Option<PaymentPreimage>,
255-
amount: u64,
255+
amount_msat: u64,
256256
/// Defaults to 0 for HTLC-Success transactions, which have no expiry
257257
cltv_expiry: u32,
258258
}
259259

260260
impl HolderHTLCOutput {
261-
pub(crate) fn build_offered(amount: u64, cltv_expiry: u32) -> Self {
261+
pub(crate) fn build_offered(amount_msat: u64, cltv_expiry: u32) -> Self {
262262
HolderHTLCOutput {
263263
preimage: None,
264-
amount,
264+
amount_msat,
265265
cltv_expiry,
266266
}
267267
}
268268

269-
pub(crate) fn build_accepted(preimage: PaymentPreimage, amount: u64) -> Self {
269+
pub(crate) fn build_accepted(preimage: PaymentPreimage, amount_msat: u64) -> Self {
270270
HolderHTLCOutput {
271271
preimage: Some(preimage),
272-
amount,
272+
amount_msat,
273273
cltv_expiry: 0,
274274
}
275275
}
276276
}
277277

278278
impl_writeable_tlv_based!(HolderHTLCOutput, {
279-
(0, amount, required),
279+
(0, amount_msat, required),
280280
(2, cltv_expiry, required),
281281
(4, preimage, option)
282282
});

0 commit comments

Comments
 (0)