Skip to content

Commit

Permalink
simplicity: swap program and witness data in satisfaction
Browse files Browse the repository at this point in the history
These are backward, which I noticed when constructing a Simplicity
transaction for Liquid Testnet. There isn't an easy way to unit test
this but I confirmed that the new order is the correct one on the live
network.
#
# You are committing on CAMUS
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch 2024-10--taproot-improvements
# Changes to be committed:
#	modified:   src/descriptor/tr.rs
#
  • Loading branch information
apoelstra committed Oct 10, 2024
1 parent 37ad9e7 commit 7464550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/descriptor/tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ impl<'a, Pk: ToPublicKey, Ext: ParseableExt> TapLeafScript<'a, Pk, Ext> {
let satisfier = crate::simplicity::SatisfierWrapper::new(satisfier);
let program = sim.satisfy(&satisfier).map_err(|_| Error::CouldNotSatisfy)?;
let (program_bytes, witness_bytes) = program.encode_to_vec();
Ok(vec![program_bytes, witness_bytes])
Ok(vec![witness_bytes, program_bytes])
}
}
}
Expand Down

0 comments on commit 7464550

Please sign in to comment.