From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Wed, 9 Nov 2022 20:24:10 +0000 (+0000) Subject: Merge pull request #1796 from tnull/2022-10-track-confirmation-block-hash X-Git-Tag: v0.0.113~48 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b6fce3d9cc8931df6ef6f7143dbb97987db7611b;p=rust-lightning Merge pull request #1796 from tnull/2022-10-track-confirmation-block-hash Track confirmation block hash and return via `Confirm::get_relevant_txids` --- b6fce3d9cc8931df6ef6f7143dbb97987db7611b diff --cc lightning/src/ln/channelmanager.rs index 7f9531331,a24e623e3..91a853132 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@@ -5906,12 -5853,12 +5906,12 @@@ wher }); } - fn get_relevant_txids(&self) -> Vec { + fn get_relevant_txids(&self) -> Vec<(Txid, Option)> { let channel_state = self.channel_state.lock().unwrap(); - let mut res = Vec::with_capacity(channel_state.short_to_chan_info.len()); + let mut res = Vec::with_capacity(channel_state.by_id.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