/// Watches a channel identified by `funding_txo` using `monitor`.
///
/// Implementations are responsible for watching the chain for the funding transaction along
- /// with spends of its output and any outputs returned by [`get_outputs_to_watch`]. In practice,
- /// this means calling [`block_connected`] and [`block_disconnected`] on the monitor and
- /// including all such transactions that meet this criteria.
+ /// with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means
+ /// calling [`block_connected`] and [`block_disconnected`] on the monitor and including all such
+ /// transactions that meet this criteria.
///
/// [`get_outputs_to_watch`]: ../ln/channelmonitor/struct.ChannelMonitor.html#method.get_outputs_to_watch
/// [`block_connected`]: ../ln/channelmonitor/struct.ChannelMonitor.html#method.block_connected
};
onchain_tx_handler.provide_latest_holder_tx(initial_holder_commitment_tx);
+ let mut outputs_to_watch = HashMap::new();
+ outputs_to_watch.insert(funding_info.0.txid, vec![funding_info.1.clone()]);
+
ChannelMonitor {
latest_update_id: 0,
commitment_transaction_number_obscure_factor,
pending_events: Vec::new(),
onchain_events_waiting_threshold_conf: HashMap::new(),
- outputs_to_watch: HashMap::new(),
+ outputs_to_watch,
onchain_tx_handler,