Skip to content

Commit 2ed352c

Browse files
committed
Delete HTLCDescriptor::tx_input_witness
1 parent 61fc584 commit 2ed352c

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

lightning/src/events/bump_transaction.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,8 @@ pub enum BumpTransactionEvent {
182182
///
183183
/// The consumer should be able to sign for any of the non-HTLC inputs added to the resulting
184184
/// HTLC transaction. To sign HTLC inputs, an [`EcdsaChannelSigner`] should be re-derived
185-
/// through [`HTLCDescriptor::derive_channel_signer`]. Each HTLC input's signature can be
186-
/// computed with [`ChannelSigner::sign_holder_htlc_transaction`], which can then be
187-
/// provided to [`HTLCDescriptor::tx_input_witness`] to obtain the fully signed witness required
188-
/// to spend.
185+
/// through [`HTLCDescriptor::derive_channel_signer`]. Each HTLC input's witness can be
186+
/// computed with [`ChannelSigner::sign_holder_htlc_transaction`].
189187
///
190188
/// It is possible to receive more than one instance of this event if a valid HTLC transaction
191189
/// is never broadcast or is but not with a sufficient fee to be mined. Care should be taken by

lightning/src/sign/mod.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use bitcoin::ecdsa::Signature as EcdsaSignature;
1818
use bitcoin::locktime::absolute::LockTime;
1919
use bitcoin::network::Network;
2020
use bitcoin::opcodes;
21-
use bitcoin::script::{Builder, Script, ScriptBuf};
21+
use bitcoin::script::{Builder, ScriptBuf};
2222
use bitcoin::sighash;
2323
use bitcoin::sighash::EcdsaSighashType;
2424
use bitcoin::transaction::Version;
@@ -626,18 +626,6 @@ impl HTLCDescriptor {
626626
)
627627
}
628628

629-
/// Returns the fully signed witness required to spend the HTLC output in the commitment
630-
/// transaction.
631-
pub fn tx_input_witness(&self, signature: &Signature, witness_script: &Script) -> Witness {
632-
chan_utils::build_htlc_input_witness(
633-
signature,
634-
&self.counterparty_sig,
635-
&self.preimage,
636-
witness_script,
637-
self.channel_derivation_parameters.transaction_parameters.channel_type_features(),
638-
)
639-
}
640-
641629
/// Derives the channel signer required to sign the HTLC input.
642630
pub fn derive_channel_signer<S: EcdsaChannelSigner, SP: Deref>(&self, signer_provider: &SP) -> S
643631
where

0 commit comments

Comments
 (0)