Skip to content

Commit 44f46e7

Browse files
committed
Fix impl signatures.
1 parent 1215707 commit 44f46e7

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

lightning/src/sign/mod.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ use crate::ln::channel::ANCHOR_OUTPUT_VALUE_SATOSHI;
4343
use crate::ln::{chan_utils, PaymentPreimage};
4444
use crate::ln::chan_utils::{HTLCOutputInCommitment, make_funding_redeemscript, ChannelPublicKeys, HolderCommitmentTransaction, ChannelTransactionParameters, CommitmentTransaction, ClosingTransaction};
4545
use crate::ln::msgs::{UnsignedChannelAnnouncement, UnsignedGossipMessage};
46+
#[cfg(taproot)]
47+
use crate::ln::msgs::PartialSignatureWithNonce;
4648
use crate::ln::script::ShutdownScript;
4749
use crate::offers::invoice::UnsignedBolt12Invoice;
4850
use crate::offers::invoice_request::UnsignedInvoiceRequest;
@@ -1127,35 +1129,35 @@ impl TaprootChannelSigner for InMemorySigner {
11271129
todo!()
11281130
}
11291131

1130-
fn partially_sign_counterparty_commitment(&self, commitment_tx: &CommitmentTransaction, preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignature, Vec<Signature>), ()> {
1132+
fn partially_sign_counterparty_commitment(&self, commitment_tx: &CommitmentTransaction, preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignatureWithNonce, Vec<schnorr::Signature>), ()> {
11311133
todo!()
11321134
}
11331135

1134-
fn partially_sign_holder_commitment_and_htlcs(&self, commitment_tx: &HolderCommitmentTransaction, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignature, Vec<Signature>), ()> {
1136+
fn partially_sign_holder_commitment_and_htlcs(&self, commitment_tx: &HolderCommitmentTransaction, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignature, Vec<schnorr::Signature>), ()> {
11351137
todo!()
11361138
}
11371139

1138-
fn sign_justice_revoked_output(&self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, secp_ctx: &Secp256k1<All>) -> Result<Signature, ()> {
1140+
fn sign_justice_revoked_output(&self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, secp_ctx: &Secp256k1<All>) -> Result<schnorr::Signature, ()> {
11391141
todo!()
11401142
}
11411143

1142-
fn sign_justice_revoked_htlc(&self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All>) -> Result<Signature, ()> {
1144+
fn sign_justice_revoked_htlc(&self, justice_tx: &Transaction, input: usize, amount: u64, per_commitment_key: &SecretKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All>) -> Result<schnorr::Signature, ()> {
11431145
todo!()
11441146
}
11451147

1146-
fn sign_holder_htlc_transaction(&self, htlc_tx: &Transaction, input: usize, htlc_descriptor: &HTLCDescriptor, secp_ctx: &Secp256k1<All>) -> Result<Signature, ()> {
1148+
fn sign_holder_htlc_transaction(&self, htlc_tx: &Transaction, input: usize, htlc_descriptor: &HTLCDescriptor, secp_ctx: &Secp256k1<All>) -> Result<schnorr::Signature, ()> {
11471149
todo!()
11481150
}
11491151

1150-
fn sign_counterparty_htlc_transaction(&self, htlc_tx: &Transaction, input: usize, amount: u64, per_commitment_point: &PublicKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All>) -> Result<Signature, ()> {
1152+
fn sign_counterparty_htlc_transaction(&self, htlc_tx: &Transaction, input: usize, amount: u64, per_commitment_point: &PublicKey, htlc: &HTLCOutputInCommitment, secp_ctx: &Secp256k1<All>) -> Result<schnorr::Signature, ()> {
11511153
todo!()
11521154
}
11531155

11541156
fn partially_sign_closing_transaction(&self, closing_tx: &ClosingTransaction, secp_ctx: &Secp256k1<All>) -> Result<PartialSignature, ()> {
11551157
todo!()
11561158
}
11571159

1158-
fn sign_holder_anchor_input(&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<All>) -> Result<Signature, ()> {
1160+
fn sign_holder_anchor_input(&self, anchor_tx: &Transaction, input: usize, secp_ctx: &Secp256k1<All>) -> Result<schnorr::Signature, ()> {
11591161
todo!()
11601162
}
11611163
}

lightning/src/util/enforcing_trait_impls.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ use crate::util::ser::{Writeable, Writer};
3232
use crate::io::Error;
3333
use crate::ln::features::ChannelTypeFeatures;
3434
#[cfg(taproot)]
35+
use crate::ln::msgs::PartialSignatureWithNonce;
36+
#[cfg(taproot)]
3537
use crate::sign::taproot::TaprootChannelSigner;
3638

3739
/// Initial value for revoked commitment downward counter
@@ -255,7 +257,7 @@ impl TaprootChannelSigner for EnforcingSigner {
255257
todo!()
256258
}
257259

258-
fn partially_sign_counterparty_commitment(&self, commitment_tx: &CommitmentTransaction, preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignature, Vec<secp256k1::schnorr::Signature>), ()> {
260+
fn partially_sign_counterparty_commitment(&self, commitment_tx: &CommitmentTransaction, preimages: Vec<PaymentPreimage>, secp_ctx: &Secp256k1<All>) -> Result<(PartialSignatureWithNonce, Vec<secp256k1::schnorr::Signature>), ()> {
259261
todo!()
260262
}
261263

0 commit comments

Comments
 (0)