From 5fceb0ff4f5088abfc90b08ff143cfc1a9a27bb4 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 10 Feb 2020 17:44:56 -0500 Subject: [PATCH] Add comment describing how ChannelMonitor::block_connected is called --- lightning/src/ln/channelmonitor.rs | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5