update anchors for builder

This commit is contained in:
Rene Vergara 2024-11-12 15:10:47 -06:00
parent 107e1fa6e5
commit 442d2adfad
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -2145,20 +2145,20 @@ pub extern "C" fn rust_wrapper_create_transaction(
out_len: &mut usize){ out_len: &mut usize){
let sap_input: Vec<HsaplingInput> = marshall_from_haskell_var(s_input, s_input_len, RW); let sap_input: Vec<HsaplingInput> = marshall_from_haskell_var(s_input, s_input_len, RW);
let sap_anchor_in: Vec<u8> = marshall_from_haskell_var(sap_wit, sap_wit_len, RW); let sap_anchor_in: Vec<u8> = marshall_from_haskell_var(sap_wit, sap_wit_len, RW);
let sap_anchor = SaplingAnchor::from_bytes(to_array(sap_anchor_in)); let sap_anchor = Node::from_bytes(to_array(sap_anchor_in));
let sapling_anchor = let sapling_anchor =
if sap_anchor.is_some().into() { if sap_anchor.is_some().into() {
Some(sap_anchor.unwrap()) Some(SaplingAnchor::from(sap_anchor.unwrap()))
} else { } else {
None None
}; };
println!("{:?}", sapling_anchor); println!("{:?}", sapling_anchor);
let orch_input: Vec<HorchardInput> = marshall_from_haskell_var(o_input, o_input_len, RW); let orch_input: Vec<HorchardInput> = marshall_from_haskell_var(o_input, o_input_len, RW);
let orch_anchor_in : Vec<u8> = marshall_from_haskell_var(orch_wit, orch_wit_len, RW); let orch_anchor_in : Vec<u8> = marshall_from_haskell_var(orch_wit, orch_wit_len, RW);
let orch_anchor = OrchardAnchor::from_bytes(to_array(orch_anchor_in)); let orch_anchor = MerkleHashOrchard::from_bytes(&to_array(orch_anchor_in));
let orchard_anchor = let orchard_anchor =
if orch_anchor.is_some().into() { if orch_anchor.is_some().into() {
Some(orch_anchor.unwrap()) Some(OrchardAnchor::from(orch_anchor.unwrap()))
} else { } else {
None None
}; };