Skip to content

Commit 55ace7e

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

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
@@ -253,31 +253,31 @@ impl_writeable_tlv_based!(CounterpartyReceivedHTLCOutput, {
253253
#[derive(Clone, PartialEq, Eq)]
254254
pub(crate) struct HolderHTLCOutput {
255255
preimage: Option<PaymentPreimage>,
256-
amount: u64,
256+
amount_msat: u64,
257257
/// Defaults to 0 for HTLC-Success transactions, which have no expiry
258258
cltv_expiry: u32,
259259
}
260260

261261
impl HolderHTLCOutput {
262-
pub(crate) fn build_offered(amount: u64, cltv_expiry: u32) -> Self {
262+
pub(crate) fn build_offered(amount_msat: u64, cltv_expiry: u32) -> Self {
263263
HolderHTLCOutput {
264264
preimage: None,
265-
amount,
265+
amount_msat,
266266
cltv_expiry,
267267
}
268268
}
269269

270-
pub(crate) fn build_accepted(preimage: PaymentPreimage, amount: u64) -> Self {
270+
pub(crate) fn build_accepted(preimage: PaymentPreimage, amount_msat: u64) -> Self {
271271
HolderHTLCOutput {
272272
preimage: Some(preimage),
273-
amount,
273+
amount_msat,
274274
cltv_expiry: 0,
275275
}
276276
}
277277
}
278278

279279
impl_writeable_tlv_based!(HolderHTLCOutput, {
280-
(0, amount, required),
280+
(0, amount_msat, required),
281281
(2, cltv_expiry, required),
282282
(4, preimage, option)
283283
});

0 commit comments

Comments
 (0)