Skip to content

Commit 041c3e6

Browse files
committed
Return only Some(block_hash) in CM rel. txids
As of now the `Confirm::get_relevant_txids()` docs state that it won't return any transactions for which we hadn't previously seen a confirmation. To align its functionality a bit more with the docs, at least for `ChannelManager`, we only return values for which we had registered a confirmation block hash before.
1 parent c59150a commit 041c3e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5786,8 +5786,8 @@ where
57865786
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
57875787
let peer_state = &mut *peer_state_lock;
57885788
for chan in peer_state.channel_by_id.values() {
5789-
if let (Some(funding_txo), block_hash) = (chan.get_funding_txo(), chan.get_funding_tx_confirmed_in()) {
5790-
res.push((funding_txo.txid, block_hash));
5789+
if let (Some(funding_txo), Some(block_hash)) = (chan.get_funding_txo(), chan.get_funding_tx_confirmed_in()) {
5790+
res.push((funding_txo.txid, Some(block_hash)));
57915791
}
57925792
}
57935793
}

0 commit comments

Comments
 (0)