Skip to content

Commit 72e9e85

Browse files
committed
f Hmpf, Option<BlockHash> for now :(
1 parent 9c44274 commit 72e9e85

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ where
544544
});
545545
}
546546

547-
fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)> {
547+
fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
548548
let mut txids = Vec::new();
549549
let monitor_states = self.monitors.read().unwrap();
550550
for monitor_state in monitor_states.values() {

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,11 +1486,11 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
14861486
}
14871487

14881488
/// Returns the set of txids that should be monitored for re-organization out of the chain.
1489-
pub fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)> {
1489+
pub fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
14901490
let inner = self.inner.lock().unwrap();
1491-
let mut txids: Vec<(Txid, BlockHash)> = inner.onchain_events_awaiting_threshold_conf
1491+
let mut txids: Vec<(Txid, Option<BlockHash>)> = inner.onchain_events_awaiting_threshold_conf
14921492
.iter()
1493-
.map(|entry| (entry.txid, entry.block_hash.unwrap()))
1493+
.map(|entry| (entry.txid, entry.block_hash))
14941494
.chain(inner.onchain_tx_handler.get_relevant_txids().into_iter())
14951495
.collect();
14961496
txids.sort_unstable();
@@ -3541,7 +3541,7 @@ where
35413541
self.0.best_block_updated(header, height, &*self.1, &*self.2, &*self.3);
35423542
}
35433543

3544-
fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)> {
3544+
fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
35453545
self.0.get_relevant_txids()
35463546
}
35473547
}

lightning/src/chain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub trait Confirm {
185185
///
186186
/// [`transactions_confirmed`]: Self::transactions_confirmed
187187
/// [`transaction_unconfirmed`]: Self::transaction_unconfirmed
188-
fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)>;
188+
fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)>;
189189
}
190190

191191
/// An enum representing the status of a channel monitor update persistence.

lightning/src/chain/onchaintx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,10 +830,10 @@ impl<ChannelSigner: Sign> OnchainTxHandler<ChannelSigner> {
830830
self.claimable_outpoints.get(outpoint).is_some()
831831
}
832832

833-
pub(crate) fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)> {
834-
let mut txids: Vec<(Txid, BlockHash)> = self.onchain_events_awaiting_threshold_conf
833+
pub(crate) fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
834+
let mut txids: Vec<(Txid, Option<BlockHash>)> = self.onchain_events_awaiting_threshold_conf
835835
.iter()
836-
.map(|entry| (entry.txid, entry.block_hash.unwrap()))
836+
.map(|entry| (entry.txid, entry.block_hash))
837837
.collect();
838838
txids.sort_unstable_by_key(|tuple| tuple.0);
839839
txids.dedup();

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5759,11 +5759,11 @@ where
57595759
});
57605760
}
57615761

5762-
fn get_relevant_txids(&self) -> Vec<(Txid, BlockHash)> {
5762+
fn get_relevant_txids(&self) -> Vec<(Txid, Option<BlockHash>)> {
57635763
let channel_state = self.channel_state.lock().unwrap();
57645764
let mut res = Vec::with_capacity(channel_state.short_to_chan_info.len());
57655765
for chan in channel_state.by_id.values() {
5766-
if let (Some(funding_txo), Some(block_hash)) = (chan.get_funding_txo(), chan.get_funding_tx_confirmed_in()) {
5766+
if let (Some(funding_txo), block_hash) = (chan.get_funding_txo(), chan.get_funding_tx_confirmed_in()) {
57675767
res.push((funding_txo.txid, block_hash));
57685768
}
57695769
}

0 commit comments

Comments
 (0)