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 committed Dec 20, 2023
1 parent 35c7274 commit d987443
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 @@ -1073,11 +1073,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
/// 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.
Expand Down

0 comments on commit d987443

Please sign in to comment.