]> git.bitcoin.ninja Git - rust-lightning/blobdiff - lightning/src/ln/channelmonitor.rs
Merge pull request #618 from TheBlueMatt/2020-05-sample-c-bindings
[rust-lightning] / lightning / src / ln / channelmonitor.rs
index 4ba7eb2d2d00e1f6b5ce3b0dad168d8de436c594..36369644344591a177ced3c1ca020479b9995f06 100644 (file)
@@ -180,6 +180,8 @@ impl_writeable!(HTLCUpdate, 0, { payment_hash, payment_preimage, source });
 ///
 /// If you're using this for local monitoring of your own channels, you probably want to use
 /// `OutPoint` as the key, which will give you a ManyChannelMonitor implementation.
+///
+/// (C-not exported) due to an unconstrained generic in `Key`
 pub struct SimpleManyChannelMonitor<Key, ChanSigner: ChannelKeys, T: Deref, F: Deref, L: Deref, C: Deref>
        where T::Target: BroadcasterInterface,
         F::Target: FeeEstimator,
@@ -1421,6 +1423,8 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
 
        /// Gets a list of txids, with their output scripts (in the order they appear in the
        /// transaction), which we must learn about spends of via block_connected().
+       ///
+       /// (C-not exported) because we have no HashMap bindings
        pub fn get_outputs_to_watch(&self) -> &HashMap<Txid, Vec<Script>> {
                &self.outputs_to_watch
        }
@@ -1429,6 +1433,8 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
        /// Generally useful when deserializing as during normal operation the return values of
        /// block_connected are sufficient to ensure all relevant outpoints are being monitored (note
        /// that the get_funding_txo outpoint and transaction must also be monitored for!).
+       ///
+       /// (C-not exported) as there is no practical way to track lifetimes of returned values.
        pub fn get_monitored_outpoints(&self) -> Vec<(Txid, u32, &Script)> {
                let mut res = Vec::with_capacity(self.remote_commitment_txn_on_chain.len() * 2);
                for (ref txid, &(_, ref outputs)) in self.remote_commitment_txn_on_chain.iter() {