Optimize transaction creation #98

Merged
pitmutt merged 17 commits from rav001 into milestone2 2024-10-30 16:47:12 +00:00
Showing only changes of commit 1e350c289c - Show all commits

View file

@ -1914,12 +1914,12 @@ pub extern "C" fn rust_wrapper_create_transaction(
}
for o_in in orch_input {
if o_in.sk.len() > 1 {
println!("o inp: {:?}", o_in);
let sp_key = SpendingKey::from_bytes(o_in.sk[0..32].try_into().unwrap()).unwrap();
let pay_addr = OrchardAddress::from_raw_address_bytes(&to_array(o_in.note.recipient)).unwrap();
let rho = Rho::from_bytes(&to_array(o_in.note.rho)).unwrap();
let rseed = RandomSeed::from_bytes(to_array(o_in.note.rseed.bytes), &rho).unwrap();
let val = NoteValue::from_raw(o_in.note.note);
println!("o inp: {:?}", val);
let note = Note::from_parts(pay_addr, val, rho, rseed).unwrap();
let wit_reader = Cursor::new(o_in.iw);
let iw: IncrementalWitness<MerkleHashOrchard, 32> = read_incremental_witness(wit_reader).unwrap();