]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add comment describing how ChannelMonitor::block_connected is called 2020-01-monitor-reload-watch
authorMatt Corallo <git@bluematt.me>
Mon, 10 Feb 2020 22:44:56 +0000 (17:44 -0500)
committerMatt Corallo <git@bluematt.me>
Tue, 18 Feb 2020 23:20:33 +0000 (18:20 -0500)
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;