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
All LN-Penalty channel signers need to be able to punish the
counterparty in case they broadcast an old state. In this commit, we
ask implementers of `ChannelSigner` to produce the full transaction with
the given input finalized to punish the corresponding previous output.
Consumers of the `ChannelSigner` trait can now be agnostic to the
specific scripts used in revokeable outputs.
We leave passing to the `ChannelSigner` all the previous `TxOut`'s
needed to produce valid schnorr signatures under BIP 341 spending rules
to a later patch.
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
-
let witness_script = chan_utils::get_revokeable_redeemscript(&chan_keys.revocation_key, outp.on_counterparty_tx_csv,&chan_keys.broadcaster_delayed_payment_key);
609
607
//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){
ifletOk(tx) = onchain_handler.signer.punish_revokeable_output(bumped_tx, i, outp.amount.to_sat(),&outp.per_commitment_key,&onchain_handler.secp_ctx,&outp.per_commitment_point){
0 commit comments