Add comment describing how ChannelMonitor::block_connected is called
[rust-lightning] / lightning / src / ln / channelmonitor.rs
index 71ce91fd202444a22c97a5eb4bad683b6108784c..68674ac3ae098c3db7d70a173755e44232c77c44 100644 (file)
@@ -2397,6 +2397,11 @@ impl<ChanSigner: ChannelKeys> ChannelMonitor<ChanSigner> {
                }
        }
 
+       /// Called by SimpleManyChannelMonitor::block_connected, which implements
+       /// ChainListener::block_connected.
+       /// Eventually this should be pub and, roughly, implement ChainListener, however this requires
+       /// &mut self, as well as returns new spendable outputs and outpoints to watch for spending of
+       /// on-chain.
        fn block_connected(&mut self, txn_matched: &[&Transaction], height: u32, block_hash: &Sha256dHash, broadcaster: &BroadcasterInterface, fee_estimator: &FeeEstimator)-> (Vec<(Sha256dHash, Vec<TxOut>)>, Vec<SpendableOutputDescriptor>, Vec<(HTLCSource, Option<PaymentPreimage>, PaymentHash)>) {
                for tx in txn_matched {
                        let mut output_val = 0;