From bee53fa04a7895ca53672675112e46d863929069 Mon Sep 17 00:00:00 2001 From: Devrandom Date: Wed, 8 Jan 2020 11:22:45 -0800 Subject: [PATCH] Provide redeem scripts to sign_remote_commitment --- lightning/src/chain/keysinterface.rs | 5 +- lightning/src/ln/channel.rs | 56 +++++++++++++-------- lightning/src/util/enforcing_trait_impls.rs | 6 ++- lightning/src/util/transaction_utils.rs | 10 ++++ 4 files changed, 51 insertions(+), 26 deletions(-) diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index fae609cc8..081ed7c3b 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -142,7 +142,7 @@ pub trait ChannelKeys : Send { /// TODO: Document the things someone using this interface should enforce before signing. /// TODO: Add more input vars to enable better checking (preferably removing commitment_tx and /// making the callee generate it via some util function we expose)! - fn sign_remote_commitment(&self, channel_value_satoshis: u64, channel_funding_redeemscript: &Script, feerate_per_kw: u64, commitment_tx: &Transaction, keys: &TxCreationKeys, htlcs: &[&HTLCOutputInCommitment], to_self_delay: u16, secp_ctx: &Secp256k1) -> Result<(Signature, Vec), ()>; + fn sign_remote_commitment(&self, channel_value_satoshis: u64, channel_funding_redeemscript: &Script, feerate_per_kw: u64, commitment_tx: &Transaction, keys: &TxCreationKeys, htlcs: &[&HTLCOutputInCommitment], to_self_delay: u16, secp_ctx: &Secp256k1, redeem_scripts: &Vec