Skip to content

Commit 7464550

Browse files
committed
simplicity: swap program and witness data in satisfaction
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 #
1 parent 37ad9e7 commit 7464550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/descriptor/tr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ impl<'a, Pk: ToPublicKey, Ext: ParseableExt> TapLeafScript<'a, Pk, Ext> {
554554
let satisfier = crate::simplicity::SatisfierWrapper::new(satisfier);
555555
let program = sim.satisfy(&satisfier).map_err(|_| Error::CouldNotSatisfy)?;
556556
let (program_bytes, witness_bytes) = program.encode_to_vec();
557-
Ok(vec![program_bytes, witness_bytes])
557+
Ok(vec![witness_bytes, program_bytes])
558558
}
559559
}
560560
}

0 commit comments

Comments
 (0)