From baf2dec06b3f16cdd111369a95f0348adce829fc Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Wed, 13 Jul 2022 10:27:45 -0700 Subject: [PATCH] Specify amount units in HolderHTLCOutput This is only a name change, there is no change in behavior. --- lightning/src/chain/package.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lightning/src/chain/package.rs b/lightning/src/chain/package.rs index 32f38323d..35d90fb31 100644 --- a/lightning/src/chain/package.rs +++ b/lightning/src/chain/package.rs @@ -252,31 +252,31 @@ impl_writeable_tlv_based!(CounterpartyReceivedHTLCOutput, { #[derive(Clone, PartialEq, Eq)] pub(crate) struct HolderHTLCOutput { preimage: Option, - amount: u64, + amount_msat: u64, /// Defaults to 0 for HTLC-Success transactions, which have no expiry cltv_expiry: u32, } impl HolderHTLCOutput { - pub(crate) fn build_offered(amount: u64, cltv_expiry: u32) -> Self { + pub(crate) fn build_offered(amount_msat: u64, cltv_expiry: u32) -> Self { HolderHTLCOutput { preimage: None, - amount, + amount_msat, cltv_expiry, } } - pub(crate) fn build_accepted(preimage: PaymentPreimage, amount: u64) -> Self { + pub(crate) fn build_accepted(preimage: PaymentPreimage, amount_msat: u64) -> Self { HolderHTLCOutput { preimage: Some(preimage), - amount, + amount_msat, cltv_expiry: 0, } } } impl_writeable_tlv_based!(HolderHTLCOutput, { - (0, amount, required), + (0, amount_msat, required), (2, cltv_expiry, required), (4, preimage, option) }); -- 2.39.5