diff --git a/src/descriptor/tr.rs b/src/descriptor/tr.rs index 2b7b5c2f..61fdad38 100644 --- a/src/descriptor/tr.rs +++ b/src/descriptor/tr.rs @@ -552,8 +552,10 @@ impl<'a, Pk: ToPublicKey, Ext: ParseableExt> TapLeafScript<'a, Pk, Ext> { TapLeafScript::Simplicity(sim) => { let satisfier = crate::simplicity::SatisfierWrapper::new(satisfier); let program = sim.satisfy(&satisfier).map_err(|_| Error::CouldNotSatisfy)?; - let program_and_witness_bytes = program.encode_to_vec(); - Ok(vec![program_and_witness_bytes]) + let (program_bytes,witness_bytes) = program.encode_to_vec(); + let mut both = program_bytes; + both.extend(witness_bytes); + Ok(vec![both]) }, } }