Skip to content

Commit

Permalink
Simplify implementation of get_original_funding_txo
Browse files Browse the repository at this point in the history
  • Loading branch information
luckysori authored and Tibo-lg committed Nov 8, 2023
1 parent ac13da6 commit 37a2e5f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,11 +1030,7 @@ impl<Signer: ChannelSigner> ChannelContext<Signer> {
/// Returns the funding txo which is always the one that was confirmed on chain, even if the
/// channel is split.
pub fn get_original_funding_txo(&self) -> Option<OutPoint> {
if self.channel_transaction_parameters.original_funding_outpoint.is_none() {
self.get_funding_txo()
} else {
self.channel_transaction_parameters.original_funding_outpoint
}
self.channel_transaction_parameters.original_funding_outpoint.or(self.get_funding_txo())
}

/// Set the funding output and value of the channel, returning a `ChannelMonitorUpdate`
Expand Down

0 comments on commit 37a2e5f

Please sign in to comment.