From: Matt Corallo Date: Mon, 10 Feb 2020 22:44:56 +0000 (-0500) Subject: Add comment describing how ChannelMonitor::block_connected is called X-Git-Tag: v0.0.12~131^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=5fceb0ff4f5088abfc90b08ff143cfc1a9a27bb4;p=rust-lightning Add comment describing how ChannelMonitor::block_connected is called --- diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 71ce91fd2..68674ac3a 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -2397,6 +2397,11 @@ impl ChannelMonitor { } } + /// 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)>, Vec, Vec<(HTLCSource, Option, PaymentHash)>) { for tx in txn_matched { let mut output_val = 0;