Track block hash, return via `get_relevant_txids`
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 63e0bb5ea79a231f95e6f52590739a5c3fdd6420..a24e623e3c47c4d206fa73b8d45adaa928b41531 100644 (file)
@@ -5853,12 +5853,12 @@ where
                });
        }
 
-       fn get_relevant_txids(&self) -> Vec<Txid> {
+       fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
                let channel_state = self.channel_state.lock().unwrap();
                let mut res = Vec::with_capacity(channel_state.short_to_chan_info.len());
                for chan in channel_state.by_id.values() {
-                       if let Some(funding_txo) = chan.get_funding_txo() {
-                               res.push(funding_txo.txid);
+                       if let (Some(funding_txo), block_hash) = (chan.get_funding_txo(), chan.get_funding_tx_confirmed_in()) {
+                               res.push((funding_txo.txid, block_hash));
                        }
                }
                res