/// 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:
- /// <BIP 143 signature generated with the given key> <one zero byte aka OP_0>
+ /// <BIP 143 signature generated with the given key> <empty vector> (MINIMALIF standard rule)
/// <witness_script as provided>
/// 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
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);
},