From 1508253bf081db5e57d9ee3256553dd623f889da Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Thu, 2 Apr 2020 17:13:13 -0400 Subject: [PATCH] Enforce MINIMALIF-compliant witness for spending revokable redeemscript --- lightning/src/chain/keysinterface.rs | 2 +- lightning/src/ln/functional_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index d023c31d..2b901886 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -54,7 +54,7 @@ pub enum SpendableOutputDescriptor { /// The private key which should be used to sign the transaction is provided, as well as the /// full witness redeemScript which is hashed in the output script_pubkey. /// The witness in the spending input should be: - /// + /// (MINIMALIF standard rule) /// /// Note that the nSequence field in the input must be set to_self_delay (which corresponds to /// the transaction not being broadcastable until at least to_self_delay blocks after the input diff --git a/lightning/src/ln/functional_tests.rs b/lightning/src/ln/functional_tests.rs index 8ea9dcf7..de6488d1 100644 --- a/lightning/src/ln/functional_tests.rs +++ b/lightning/src/ln/functional_tests.rs @@ -4009,7 +4009,7 @@ macro_rules! check_spendable_outputs { let local_delaysig = secp_ctx.sign(&sighash, key); spend_tx.input[0].witness.push(local_delaysig.serialize_der().to_vec()); spend_tx.input[0].witness[0].push(SigHashType::All as u8); - spend_tx.input[0].witness.push(vec!(0)); + spend_tx.input[0].witness.push(vec!()); spend_tx.input[0].witness.push(witness_script.clone().into_bytes()); txn.push(spend_tx); }, -- 2.30.2