X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchan_utils.rs;h=b1171f543989c8d9deb7c6d68a18fb61e5e27af5;hb=e885d0a7747cfc3b89a3c2765a8c0dd174e3889a;hp=8037de64eb562f4ef854b511a382625b77f0e035;hpb=9c9c88147e6a8fa637dc048f764ab8ecfea200d4;p=rust-lightning diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index 8037de64..b1171f54 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -843,6 +843,7 @@ impl PartialEq for CommitmentTransaction { } } +/// (C-not exported) as users never need to call this directly impl Writeable for Vec { #[inline] fn write(&self, w: &mut W) -> Result<(), ::std::io::Error> { @@ -854,6 +855,7 @@ impl Writeable for Vec { } } +/// (C-not exported) as users never need to call this directly impl Readable for Vec { #[inline] fn read(r: &mut R) -> Result { @@ -889,6 +891,8 @@ impl CommitmentTransaction { /// This auxiliary data is not stored in this object. /// /// Only include HTLCs that are above the dust limit for the channel. + /// + /// (C-not exported) due to the generic though we likely should expose a version without pub fn new_with_auxiliary_htlc_data(commitment_number: u64, to_broadcaster_value_sat: u64, to_countersignatory_value_sat: u64, keys: TxCreationKeys, feerate_per_kw: u32, htlcs_with_aux: &mut Vec<(HTLCOutputInCommitment, T)>, channel_parameters: &DirectedChannelTransactionParameters) -> CommitmentTransaction { // Sort outputs and populate output indices while keeping track of the auxiliary data let (outputs, htlcs) = Self::internal_build_outputs(&keys, to_broadcaster_value_sat, to_countersignatory_value_sat, htlcs_with_aux, channel_parameters).unwrap(); @@ -1056,6 +1060,9 @@ impl CommitmentTransaction { /// The non-dust HTLCs (direction, amt, height expiration, hash, transaction output index) /// which were included in this commitment transaction in output order. /// The transaction index is always populated. + /// + /// (C-not exported) as we cannot currently convert Vec references to/from C, though we should + /// expose a less effecient version which creates a Vec of references in the future. pub fn htlcs(&self) -> &Vec { &self.htlcs }