From: Devrandom Date: Mon, 13 Jan 2020 20:16:26 +0000 (-0800) Subject: more checking X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=78c17d5d77403681801fe5aaacd0d234eb36c363;p=rust-lightning more checking --- diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index cc5a9580b..3e4cb612f 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -139,7 +139,7 @@ pub trait ChannelKeys : Send { /// /// Note that if signing fails or is rejected, the channel will be force-closed. /// - /// The commitment_tx follows BIP-69 lexicographical ordering. + /// The commitment_tx follows BOLT-3 lexicographical output ordering and has a single input. /// /// The redeem_scripts vector is 1-1 mapped to commitment_tx outputs. For p2wpkh, the /// redeem script should be empty. @@ -147,11 +147,18 @@ 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, redeem_scripts: &Vec