Skip to content

Commit 8527258

Browse files
committed
Rename various anchor methods which are now ambiguous
As we move towards zero-fee commitment transactions, we need to differentiate between the now-two-types of "anchor channels". We do so here by renaming a number of methods which refer to anchors as "keyed anchors" as the zero-fee commitment transaction anchors do not have a public key associated with them. We also drop `TaprootChannelSigner::sign_holder_anchor_input` as we are unlikely to support keyed anchors for taproot channels.
1 parent 0faf17b commit 8527258

File tree

9 files changed

+75
-87
lines changed

9 files changed

+75
-87
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5099,7 +5099,7 @@ impl<'a, 'b, ES: EntropySource, SP: SignerProvider> ReadableArgs<(&'a ES, &'b SP
50995099
{
51005100
let payment_point = onchain_tx_handler.channel_transaction_parameters.holder_pubkeys.payment_point;
51015101
counterparty_payment_script =
5102-
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&payment_point).to_p2wsh();
5102+
chan_utils::get_to_countersigner_keyed_anchor_redeemscript(&payment_point).to_p2wsh();
51035103
}
51045104

51055105
let channel_id = channel_id.unwrap_or(ChannelId::v1_from_funding_outpoint(outpoint));

lightning/src/chain/onchaintx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
666666

667667
// We'll locate an anchor output we can spend within the commitment transaction.
668668
let funding_pubkey = &self.channel_transaction_parameters.holder_pubkeys.funding_pubkey;
669-
match chan_utils::get_anchor_output(&tx.0, funding_pubkey) {
669+
match chan_utils::get_keyed_anchor_output(&tx.0, funding_pubkey) {
670670
// An anchor output was found, so we should yield a funding event externally.
671671
Some((idx, _)) => {
672672
// TODO: Use a lower confirmation target when both our and the

lightning/src/events/bump_transaction.rs

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::ln::types::ChannelId;
2222
use crate::ln::chan_utils;
2323
use crate::ln::chan_utils::{
2424
ANCHOR_INPUT_WITNESS_WEIGHT, HTLC_SUCCESS_INPUT_ANCHOR_WITNESS_WEIGHT,
25-
HTLC_TIMEOUT_INPUT_ANCHOR_WITNESS_WEIGHT, HTLCOutputInCommitment
25+
HTLC_TIMEOUT_INPUT_ANCHOR_WITNESS_WEIGHT, HTLCOutputInCommitment, shared_anchor_script_pubkey,
2626
};
2727
use crate::prelude::*;
2828
use crate::sign::{
@@ -62,8 +62,17 @@ impl AnchorDescriptor {
6262
/// Returns the UTXO to be spent by the anchor input, which can be obtained via
6363
/// [`Self::unsigned_tx_input`].
6464
pub fn previous_utxo(&self) -> TxOut {
65+
let tx_params = &self.channel_derivation_parameters.transaction_parameters;
66+
let script_pubkey =
67+
if tx_params.channel_type_features.supports_anchors_zero_fee_htlc_tx() {
68+
let channel_params = tx_params.as_holder_broadcastable();
69+
chan_utils::get_keyed_anchor_redeemscript(&channel_params.broadcaster_pubkeys().funding_pubkey)
70+
} else {
71+
assert!(tx_params.channel_type_features.supports_anchor_zero_fee_commitments());
72+
shared_anchor_script_pubkey()
73+
};
6574
TxOut {
66-
script_pubkey: self.witness_script().to_p2wsh(),
75+
script_pubkey,
6776
value: Amount::from_sat(ANCHOR_OUTPUT_VALUE_SATOSHI),
6877
}
6978
}
@@ -79,17 +88,17 @@ impl AnchorDescriptor {
7988
}
8089
}
8190

82-
/// Returns the witness script of the anchor output in the commitment transaction.
83-
pub fn witness_script(&self) -> ScriptBuf {
84-
let channel_params = self.channel_derivation_parameters.transaction_parameters.as_holder_broadcastable();
85-
chan_utils::get_anchor_redeemscript(&channel_params.broadcaster_pubkeys().funding_pubkey)
86-
}
87-
8891
/// Returns the fully signed witness required to spend the anchor output in the commitment
8992
/// transaction.
9093
pub fn tx_input_witness(&self, signature: &Signature) -> Witness {
91-
let channel_params = self.channel_derivation_parameters.transaction_parameters.as_holder_broadcastable();
92-
chan_utils::build_anchor_input_witness(&channel_params.broadcaster_pubkeys().funding_pubkey, signature)
94+
let tx_params = &self.channel_derivation_parameters.transaction_parameters;
95+
if tx_params.channel_type_features.supports_anchors_zero_fee_htlc_tx() {
96+
let channel_params = self.channel_derivation_parameters.transaction_parameters.as_holder_broadcastable();
97+
chan_utils::build_keyed_anchor_input_witness(&channel_params.broadcaster_pubkeys().funding_pubkey, signature)
98+
} else {
99+
debug_assert!(tx_params.channel_type_features.supports_anchor_zero_fee_commitments());
100+
Witness::from_slice(&[&[]])
101+
}
93102
}
94103
}
95104

@@ -111,9 +120,9 @@ pub enum BumpTransactionEvent {
111120
/// The consumer should be able to sign for any of the additional inputs included within the
112121
/// child anchor transaction. To sign its anchor input, an [`EcdsaChannelSigner`] should be
113122
/// re-derived through [`SignerProvider::derive_channel_signer`]. The anchor input signature
114-
/// can be computed with [`EcdsaChannelSigner::sign_holder_anchor_input`], which can then be
115-
/// provided to [`build_anchor_input_witness`] along with the `funding_pubkey` to obtain the
116-
/// full witness required to spend.
123+
/// can be computed with [`EcdsaChannelSigner::sign_holder_keyed_anchor_input`], which can then
124+
/// be provided to [`build_keyed_anchor_input_witness`] along with the `funding_pubkey` to
125+
/// obtain the full witness required to spend.
117126
///
118127
/// It is possible to receive more than one instance of this event if a valid child anchor
119128
/// transaction is never broadcast or is but not with a sufficient fee to be mined. Care should
@@ -133,8 +142,8 @@ pub enum BumpTransactionEvent {
133142
/// be not urgent.
134143
///
135144
/// [`EcdsaChannelSigner`]: crate::sign::ecdsa::EcdsaChannelSigner
136-
/// [`EcdsaChannelSigner::sign_holder_anchor_input`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_anchor_input
137-
/// [`build_anchor_input_witness`]: crate::ln::chan_utils::build_anchor_input_witness
145+
/// [`EcdsaChannelSigner::sign_holder_keyed_anchor_input`]: crate::sign::ecdsa::EcdsaChannelSigner::sign_holder_keyed_anchor_input
146+
/// [`build_keyed_anchor_input_witness`]: crate::ln::chan_utils::build_keyed_anchor_input_witness
138147
ChannelClose {
139148
/// The `channel_id` of the channel which has been closed.
140149
channel_id: ChannelId,
@@ -678,7 +687,7 @@ where
678687

679688
let signer = self.signer_provider.derive_channel_signer(anchor_descriptor.channel_derivation_parameters.keys_id);
680689
let channel_parameters = &anchor_descriptor.channel_derivation_parameters.transaction_parameters;
681-
let anchor_sig = signer.sign_holder_anchor_input(channel_parameters, &anchor_tx, 0, &self.secp)?;
690+
let anchor_sig = signer.sign_holder_keyed_anchor_input(channel_parameters, &anchor_tx, 0, &self.secp)?;
682691
anchor_tx.input[0].witness = anchor_descriptor.tx_input_witness(&anchor_sig);
683692

684693
#[cfg(debug_assertions)] {
@@ -850,6 +859,7 @@ mod tests {
850859
use crate::util::ser::Readable;
851860
use crate::util::test_utils::{TestBroadcaster, TestLogger};
852861
use crate::sign::KeysManager;
862+
use crate::types::features::ChannelTypeFeatures;
853863

854864
use bitcoin::hashes::Hash;
855865
use bitcoin::hex::FromHex;
@@ -934,6 +944,10 @@ mod tests {
934944
let logger = TestLogger::new();
935945
let handler = BumpTransactionEventHandler::new(&broadcaster, &source, &signer, &logger);
936946

947+
let mut transaction_parameters = ChannelTransactionParameters::test_dummy(42_000_000);
948+
transaction_parameters.channel_type_features =
949+
ChannelTypeFeatures::anchors_zero_htlc_fee_and_dependencies();
950+
937951
handler.handle_event(&BumpTransactionEvent::ChannelClose {
938952
channel_id: ChannelId([42; 32]),
939953
counterparty_node_id: PublicKey::from_slice(&[2; 33]).unwrap(),
@@ -945,7 +959,7 @@ mod tests {
945959
channel_derivation_parameters: ChannelDerivationParameters {
946960
value_satoshis: 42_000_000,
947961
keys_id: [42; 32],
948-
transaction_parameters: ChannelTransactionParameters::test_dummy(42_000_000),
962+
transaction_parameters,
949963
},
950964
outpoint: OutPoint { txid: Txid::from_byte_array([42; 32]), vout: 0 },
951965
},

lightning/src/ln/chan_utils.rs

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ pub fn get_revokeable_redeemscript(revocation_key: &RevocationKey, contest_delay
574574
/// the channel type.
575575
pub fn get_counterparty_payment_script(channel_type_features: &ChannelTypeFeatures, payment_key: &PublicKey) -> ScriptBuf {
576576
if channel_type_features.supports_anchors_zero_fee_htlc_tx() {
577-
get_to_countersignatory_with_anchors_redeemscript(payment_key).to_p2wsh()
577+
get_to_countersigner_keyed_anchor_redeemscript(payment_key).to_p2wsh()
578578
} else {
579579
ScriptBuf::new_p2wpkh(&WPubkeyHash::hash(&payment_key.serialize()))
580580
}
@@ -838,7 +838,7 @@ pub(crate) fn legacy_deserialization_prevention_marker_for_channel_type_features
838838

839839
/// Gets the witnessScript for the to_remote output when anchors are enabled.
840840
#[inline]
841-
pub fn get_to_countersignatory_with_anchors_redeemscript(payment_point: &PublicKey) -> ScriptBuf {
841+
pub fn get_to_countersigner_keyed_anchor_redeemscript(payment_point: &PublicKey) -> ScriptBuf {
842842
Builder::new()
843843
.push_slice(payment_point.serialize())
844844
.push_opcode(opcodes::all::OP_CHECKSIGVERIFY)
@@ -847,14 +847,20 @@ pub fn get_to_countersignatory_with_anchors_redeemscript(payment_point: &PublicK
847847
.into_script()
848848
}
849849

850-
/// Gets the witnessScript for an anchor output from the funding public key.
850+
/// Gets the script_pubkey for a shared anchor
851+
pub fn shared_anchor_script_pubkey() -> ScriptBuf {
852+
Builder::new().push_int(1).push_slice(&[0x4e, 0x73]).into_script()
853+
}
854+
855+
/// Gets the witnessScript for a keyed anchor (non-zero-fee-commitments) output from the funding
856+
/// public key.
857+
///
851858
/// The witness in the spending input must be:
852859
/// <BIP 143 funding_signature>
853860
/// After 16 blocks of confirmation, an alternative satisfying witness could be:
854861
/// <>
855862
/// (empty vector required to satisfy compliance with MINIMALIF-standard rule)
856-
#[inline]
857-
pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> ScriptBuf {
863+
pub fn get_keyed_anchor_redeemscript(funding_pubkey: &PublicKey) -> ScriptBuf {
858864
Builder::new().push_slice(funding_pubkey.serialize())
859865
.push_opcode(opcodes::all::OP_CHECKSIG)
860866
.push_opcode(opcodes::all::OP_IFDUP)
@@ -865,17 +871,19 @@ pub fn get_anchor_redeemscript(funding_pubkey: &PublicKey) -> ScriptBuf {
865871
.into_script()
866872
}
867873

868-
/// Locates the output with an anchor script paying to `funding_pubkey` within `commitment_tx`.
869-
pub(crate) fn get_anchor_output<'a>(commitment_tx: &'a Transaction, funding_pubkey: &PublicKey) -> Option<(u32, &'a TxOut)> {
870-
let anchor_script = get_anchor_redeemscript(funding_pubkey).to_p2wsh();
874+
/// Locates the output with a keyed anchor (non-zero-fee-commitments) script paying to
875+
/// `funding_pubkey` within `commitment_tx`.
876+
pub(crate) fn get_keyed_anchor_output<'a>(commitment_tx: &'a Transaction, funding_pubkey: &PublicKey) -> Option<(u32, &'a TxOut)> {
877+
let anchor_script = get_keyed_anchor_redeemscript(funding_pubkey).to_p2wsh();
871878
commitment_tx.output.iter().enumerate()
872879
.find(|(_, txout)| txout.script_pubkey == anchor_script)
873880
.map(|(idx, txout)| (idx as u32, txout))
874881
}
875882

876-
/// Returns the witness required to satisfy and spend an anchor input.
877-
pub fn build_anchor_input_witness(funding_key: &PublicKey, funding_sig: &Signature) -> Witness {
878-
let anchor_redeem_script = get_anchor_redeemscript(funding_key);
883+
/// Returns the witness required to satisfy and spend a keyed anchor (non-zero-fee-commitments)
884+
/// input.
885+
pub fn build_keyed_anchor_input_witness(funding_key: &PublicKey, funding_sig: &Signature) -> Witness {
886+
let anchor_redeem_script = get_keyed_anchor_redeemscript(funding_key);
879887
let mut ret = Witness::new();
880888
ret.push_ecdsa_signature(&BitcoinSignature::sighash_all(*funding_sig));
881889
ret.push(anchor_redeem_script.as_bytes());
@@ -1117,7 +1125,7 @@ impl<'a> DirectedChannelTransactionParameters<'a> {
11171125
self.inner.funding_outpoint.unwrap().into_bitcoin_outpoint()
11181126
}
11191127

1120-
/// Whether to use anchors for this channel
1128+
/// The type of channel these parameters are for
11211129
pub fn channel_type_features(&self) -> &'a ChannelTypeFeatures {
11221130
&self.inner.channel_type_features
11231131
}
@@ -1574,7 +1582,7 @@ impl CommitmentTransaction {
15741582

15751583
if to_countersignatory_value_sat > Amount::ZERO {
15761584
let script = if channel_parameters.channel_type_features().supports_anchors_zero_fee_htlc_tx() {
1577-
get_to_countersignatory_with_anchors_redeemscript(&countersignatory_pubkeys.payment_point).to_p2wsh()
1585+
get_to_countersigner_keyed_anchor_redeemscript(&countersignatory_pubkeys.payment_point).to_p2wsh()
15781586
} else {
15791587
ScriptBuf::new_p2wpkh(&Hash160::hash(&countersignatory_pubkeys.payment_point.serialize()).into())
15801588
};
@@ -1604,7 +1612,7 @@ impl CommitmentTransaction {
16041612

16051613
if channel_parameters.channel_type_features().supports_anchors_zero_fee_htlc_tx() {
16061614
if to_broadcaster_value_sat > Amount::ZERO || !htlcs_with_aux.is_empty() {
1607-
let anchor_script = get_anchor_redeemscript(broadcaster_funding_key);
1615+
let anchor_script = get_keyed_anchor_redeemscript(broadcaster_funding_key);
16081616
txouts.push((
16091617
TxOut {
16101618
script_pubkey: anchor_script.to_p2wsh(),
@@ -1615,7 +1623,7 @@ impl CommitmentTransaction {
16151623
}
16161624

16171625
if to_countersignatory_value_sat > Amount::ZERO || !htlcs_with_aux.is_empty() {
1618-
let anchor_script = get_anchor_redeemscript(countersignatory_funding_key);
1626+
let anchor_script = get_keyed_anchor_redeemscript(countersignatory_funding_key);
16191627
txouts.push((
16201628
TxOut {
16211629
script_pubkey: anchor_script.to_p2wsh(),
@@ -1953,7 +1961,7 @@ pub fn get_commitment_transaction_number_obscure_factor(
19531961
mod tests {
19541962
use super::{CounterpartyCommitmentSecrets, ChannelPublicKeys};
19551963
use crate::chain;
1956-
use crate::ln::chan_utils::{get_htlc_redeemscript, get_to_countersignatory_with_anchors_redeemscript, CommitmentTransaction, TxCreationKeys, ChannelTransactionParameters, CounterpartyChannelTransactionParameters, HTLCOutputInCommitment};
1964+
use crate::ln::chan_utils::{get_htlc_redeemscript, get_to_countersigner_keyed_anchor_redeemscript, CommitmentTransaction, TxCreationKeys, ChannelTransactionParameters, CounterpartyChannelTransactionParameters, HTLCOutputInCommitment};
19571965
use bitcoin::secp256k1::{PublicKey, SecretKey, Secp256k1};
19581966
use crate::util::test_utils;
19591967
use crate::sign::{ChannelSigner, SignerProvider};
@@ -2043,7 +2051,7 @@ mod tests {
20432051
builder.channel_parameters.channel_type_features = ChannelTypeFeatures::anchors_zero_htlc_fee_and_dependencies();
20442052
let tx = builder.build(1000, 2000);
20452053
assert_eq!(tx.built.transaction.output.len(), 4);
2046-
assert_eq!(tx.built.transaction.output[3].script_pubkey, get_to_countersignatory_with_anchors_redeemscript(&builder.counterparty_pubkeys.payment_point).to_p2wsh());
2054+
assert_eq!(tx.built.transaction.output[3].script_pubkey, get_to_countersigner_keyed_anchor_redeemscript(&builder.counterparty_pubkeys.payment_point).to_p2wsh());
20472055

20482056
// Generate broadcaster output and anchor
20492057
let tx = builder.build(3000, 0);

lightning/src/sign/ecdsa.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub trait EcdsaChannelSigner: ChannelSigner {
212212
&self, channel_parameters: &ChannelTransactionParameters, closing_tx: &ClosingTransaction,
213213
secp_ctx: &Secp256k1<secp256k1::All>,
214214
) -> Result<Signature, ()>;
215-
/// Computes the signature for a commitment transaction's anchor output used as an
215+
/// Computes the signature for a commitment transaction's keyed anchor output used as an
216216
/// input within `anchor_tx`, which spends the commitment transaction, at index `input`.
217217
///
218218
/// An `Err` can be returned to signal that the signer is unavailable/cannot produce a valid
@@ -222,7 +222,7 @@ pub trait EcdsaChannelSigner: ChannelSigner {
222222
///
223223
/// [`ChannelMonitor::signer_unblocked`]: crate::chain::channelmonitor::ChannelMonitor::signer_unblocked
224224
/// [`ChainMonitor::signer_unblocked`]: crate::chain::chainmonitor::ChainMonitor::signer_unblocked
225-
fn sign_holder_anchor_input(
225+
fn sign_holder_keyed_anchor_input(
226226
&self, channel_parameters: &ChannelTransactionParameters, anchor_tx: &Transaction,
227227
input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
228228
) -> Result<Signature, ()>;

lightning/src/sign/mod.rs

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl StaticPaymentOutputDescriptor {
166166
self.channel_transaction_parameters.as_ref().and_then(|channel_params| {
167167
if channel_params.channel_type_features.supports_anchors_zero_fee_htlc_tx() {
168168
let payment_point = channel_params.holder_pubkeys.payment_point;
169-
Some(chan_utils::get_to_countersignatory_with_anchors_redeemscript(&payment_point))
169+
Some(chan_utils::get_to_countersigner_keyed_anchor_redeemscript(&payment_point))
170170
} else {
171171
None
172172
}
@@ -1178,7 +1178,7 @@ impl InMemorySigner {
11781178
.unwrap_or(false);
11791179

11801180
let witness_script = if supports_anchors_zero_fee_htlc_tx {
1181-
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&remotepubkey.inner)
1181+
chan_utils::get_to_countersigner_keyed_anchor_redeemscript(&remotepubkey.inner)
11821182
} else {
11831183
ScriptBuf::new_p2pkh(&remotepubkey.pubkey_hash())
11841184
};
@@ -1640,23 +1640,19 @@ impl EcdsaChannelSigner for InMemorySigner {
16401640
))
16411641
}
16421642

1643-
fn sign_holder_anchor_input(
1644-
&self, channel_parameters: &ChannelTransactionParameters, anchor_tx: &Transaction,
1645-
input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
1643+
fn sign_holder_keyed_anchor_input(
1644+
&self, chan_params: &ChannelTransactionParameters, anchor_tx: &Transaction, input: usize,
1645+
secp_ctx: &Secp256k1<secp256k1::All>,
16461646
) -> Result<Signature, ()> {
1647-
assert!(channel_parameters.is_populated(), "Channel parameters must be fully populated");
1647+
assert!(chan_params.is_populated(), "Channel parameters must be fully populated");
16481648

16491649
let witness_script =
1650-
chan_utils::get_anchor_redeemscript(&channel_parameters.holder_pubkeys.funding_pubkey);
1650+
chan_utils::get_keyed_anchor_redeemscript(&chan_params.holder_pubkeys.funding_pubkey);
1651+
let amt = Amount::from_sat(ANCHOR_OUTPUT_VALUE_SATOSHI);
16511652
let sighash = sighash::SighashCache::new(&*anchor_tx)
1652-
.p2wsh_signature_hash(
1653-
input,
1654-
&witness_script,
1655-
Amount::from_sat(ANCHOR_OUTPUT_VALUE_SATOSHI),
1656-
EcdsaSighashType::All,
1657-
)
1653+
.p2wsh_signature_hash(input, &witness_script, amt, EcdsaSighashType::All)
16581654
.unwrap();
1659-
let funding_key = self.funding_key(channel_parameters.splice_parent_funding_txid);
1655+
let funding_key = self.funding_key(chan_params.splice_parent_funding_txid);
16601656
Ok(sign_with_aux_rand(secp_ctx, &hash_to_message!(&sighash[..]), &funding_key, &self))
16611657
}
16621658

@@ -1751,12 +1747,6 @@ impl TaprootChannelSigner for InMemorySigner {
17511747
) -> Result<PartialSignature, ()> {
17521748
todo!()
17531749
}
1754-
1755-
fn sign_holder_anchor_input(
1756-
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<All>,
1757-
) -> Result<schnorr::Signature, ()> {
1758-
todo!()
1759-
}
17601750
}
17611751

17621752
/// Simple implementation of [`EntropySource`], [`NodeSigner`], and [`SignerProvider`] that takes a

lightning/src/sign/taproot.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,5 @@ pub trait TaprootChannelSigner: ChannelSigner {
151151
&self, closing_tx: &ClosingTransaction, secp_ctx: &Secp256k1<secp256k1::All>,
152152
) -> Result<PartialSignature, ()>;
153153

154-
/// Computes the signature for a commitment transaction's anchor output used as an
155-
/// input within `anchor_tx`, which spends the commitment transaction, at index `input`.
156-
fn sign_holder_anchor_input(
157-
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<secp256k1::All>,
158-
) -> Result<Signature, ()>;
159-
160154
// TODO: sign channel announcement
161155
}

lightning/src/util/dyn_signer.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ impl TaprootChannelSigner for DynSigner {
117117
) -> Result<PartialSignature, ()> {
118118
todo!();
119119
}
120-
121-
fn sign_holder_anchor_input(
122-
&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<All>,
123-
) -> Result<secp256k1::schnorr::Signature, ()> {
124-
todo!();
125-
}
126120
}
127121

128122
impl Clone for DynSigner {
@@ -158,7 +152,7 @@ delegate!(DynSigner, EcdsaChannelSigner, inner,
158152
channel_parameters: &ChannelTransactionParameters, msg: &UnsignedChannelAnnouncement,
159153
secp_ctx: &Secp256k1<secp256k1::All>
160154
) -> Result<Signature, ()>,
161-
fn sign_holder_anchor_input(, channel_parameters: &ChannelTransactionParameters,
155+
fn sign_holder_keyed_anchor_input(, channel_parameters: &ChannelTransactionParameters,
162156
anchor_tx: &Transaction, input: usize,
163157
secp_ctx: &Secp256k1<secp256k1::All>) -> Result<Signature, ()>,
164158
fn sign_holder_htlc_transaction(, htlc_tx: &Transaction, input: usize,

0 commit comments

Comments
 (0)