From: Wilmer Paulino Date: Wed, 13 Jul 2022 17:27:45 +0000 (-0700) Subject: Specify amount units in HolderHTLCOutput X-Git-Tag: v0.0.113~12^2~7 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=baf2dec06b3f16cdd111369a95f0348adce829fc;p=rust-lightning Specify amount units in HolderHTLCOutput This is only a name change, there is no change in behavior. --- 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) });