You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let sig = self.signer.unsafe_sign_holder_commitment(&self.holder_commitment,&self.secp_ctx).expect("sign holder commitment");
1198
+
let sig = self.signer.unsafe_sign_holder_commitment(&self.channel_transaction_parameters,&self.holder_commitment,&self.secp_ctx).expect("sign holder commitment");
let channel_parameters = &onchain_handler.channel_transaction_parameters;
605
606
matchself{
606
607
PackageSolvingData::RevokedOutput(ref outp) => {
607
608
let chan_keys = TxCreationKeys::derive_new(&onchain_handler.secp_ctx,&outp.per_commitment_point,&outp.counterparty_delayed_payment_base_key,&outp.counterparty_htlc_base_key,&onchain_handler.signer.pubkeys().revocation_basepoint,&onchain_handler.signer.pubkeys().htlc_basepoint);
608
609
let witness_script = chan_utils::get_revokeable_redeemscript(&chan_keys.revocation_key, outp.on_counterparty_tx_csv,&chan_keys.broadcaster_delayed_payment_key);
609
610
//TODO: should we panic on signer failure ?
610
-
ifletOk(sig) = onchain_handler.signer.sign_justice_revoked_output(&bumped_tx, i, outp.amount.to_sat(),&outp.per_commitment_key,&onchain_handler.secp_ctx){
611
+
ifletOk(sig) = onchain_handler.signer.sign_justice_revoked_output(channel_parameters,&bumped_tx, i, outp.amount.to_sat(),&outp.per_commitment_key,&onchain_handler.secp_ctx){
611
612
letmut ser_sig = sig.serialize_der().to_vec();
612
613
ser_sig.push(EcdsaSighashType::Allasu8);
613
614
bumped_tx.input[i].witness.push(ser_sig);
@@ -619,7 +620,7 @@ impl PackageSolvingData {
619
620
let chan_keys = TxCreationKeys::derive_new(&onchain_handler.secp_ctx,&outp.per_commitment_point,&outp.counterparty_delayed_payment_base_key,&outp.counterparty_htlc_base_key,&onchain_handler.signer.pubkeys().revocation_basepoint,&onchain_handler.signer.pubkeys().htlc_basepoint);
620
621
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&outp.htlc,&onchain_handler.channel_type_features(),&chan_keys.broadcaster_htlc_key,&chan_keys.countersignatory_htlc_key,&chan_keys.revocation_key);
621
622
//TODO: should we panic on signer failure ?
622
-
ifletOk(sig) = onchain_handler.signer.sign_justice_revoked_htlc(&bumped_tx, i, outp.amount,&outp.per_commitment_key,&outp.htlc,&onchain_handler.secp_ctx){
623
+
ifletOk(sig) = onchain_handler.signer.sign_justice_revoked_htlc(channel_parameters,&bumped_tx, i, outp.amount,&outp.per_commitment_key,&outp.htlc,&onchain_handler.secp_ctx){
623
624
letmut ser_sig = sig.serialize_der().to_vec();
624
625
ser_sig.push(EcdsaSighashType::Allasu8);
625
626
bumped_tx.input[i].witness.push(ser_sig);
@@ -631,7 +632,7 @@ impl PackageSolvingData {
631
632
let chan_keys = TxCreationKeys::derive_new(&onchain_handler.secp_ctx,&outp.per_commitment_point,&outp.counterparty_delayed_payment_base_key,&outp.counterparty_htlc_base_key,&onchain_handler.signer.pubkeys().revocation_basepoint,&onchain_handler.signer.pubkeys().htlc_basepoint);
632
633
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&outp.htlc,&onchain_handler.channel_type_features(),&chan_keys.broadcaster_htlc_key,&chan_keys.countersignatory_htlc_key,&chan_keys.revocation_key);
let chan_keys = TxCreationKeys::derive_new(&onchain_handler.secp_ctx,&outp.per_commitment_point,&outp.counterparty_delayed_payment_base_key,&outp.counterparty_htlc_base_key,&onchain_handler.signer.pubkeys().revocation_basepoint,&onchain_handler.signer.pubkeys().htlc_basepoint);
644
645
let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&outp.htlc,&onchain_handler.channel_type_features(),&chan_keys.broadcaster_htlc_key,&chan_keys.countersignatory_htlc_key,&chan_keys.revocation_key);
0 commit comments