Skip to content

Commit

Permalink
encode_to_vec change
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed Oct 1, 2024
1 parent feeb3b8 commit 9e6c914
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/descriptor/tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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])
},
}
}
Expand Down

0 comments on commit 9e6c914

Please sign in to comment.