Skip to content

Commit b76dd17

Browse files
committed
f - avoid accessing FundingScope from ChannelManager
1 parent 2e85dde commit b76dd17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,11 +1805,6 @@ impl FundingScope {
18051805
pub fn get_channel_type(&self) -> &ChannelTypeFeatures {
18061806
&self.channel_transaction_parameters.channel_type_features
18071807
}
1808-
1809-
/// Returns the block hash in which our funding transaction was confirmed.
1810-
pub fn get_funding_tx_confirmed_in(&self) -> Option<BlockHash> {
1811-
self.funding_tx_confirmed_in
1812-
}
18131808
}
18141809

18151810
/// Info about a pending splice, used in the pre-splice channel
@@ -9463,6 +9458,11 @@ impl<SP: Deref> FundedChannel<SP> where
94639458
pub fn is_v2_established(&self) -> bool {
94649459
self.is_v2_established
94659460
}
9461+
9462+
/// Returns the block hash in which our funding transaction was confirmed.
9463+
pub fn get_funding_tx_confirmed_in(&self) -> Option<BlockHash> {
9464+
self.funding.funding_tx_confirmed_in
9465+
}
94669466
}
94679467

94689468
/// A not-yet-funded outbound (from holder) channel using V1 channel establishment.

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11639,7 +11639,7 @@ where
1163911639
for chan in peer_state.channel_by_id.values().filter_map(Channel::as_funded) {
1164011640
let txid_opt = chan.funding.get_funding_txo();
1164111641
let height_opt = chan.context.get_funding_tx_confirmation_height();
11642-
let hash_opt = chan.funding.get_funding_tx_confirmed_in();
11642+
let hash_opt = chan.get_funding_tx_confirmed_in();
1164311643
if let (Some(funding_txo), Some(conf_height), Some(block_hash)) = (txid_opt, height_opt, hash_opt) {
1164411644
res.push((funding_txo.txid, conf_height, Some(block_hash)));
1164511645
}

0 commit comments

Comments
 (0)