Rust dependencies update #103
1 changed files with 23 additions and 17 deletions
|
@ -1590,6 +1590,11 @@ pub extern "C" fn rust_wrapper_combine_orchard_nodes(
|
||||||
){
|
){
|
||||||
let left_in: Vec<u8> = marshall_from_haskell_var(left, left_len, RW);
|
let left_in: Vec<u8> = marshall_from_haskell_var(left, left_len, RW);
|
||||||
let right_in: Vec<u8> = marshall_from_haskell_var(right, right_len, RW);
|
let right_in: Vec<u8> = marshall_from_haskell_var(right, right_len, RW);
|
||||||
|
if left_in.len() > 1 {
|
||||||
|
let n = MerkleHashOrchard::combine(Level::new(level), &MerkleHashOrchard::empty_leaf(), &MerkleHashOrchard::empty_leaf());
|
||||||
|
let h = Hhex { bytes: n.to_bytes().to_vec() };
|
||||||
|
marshall_to_haskell_var(&h, out, out_len, RW);
|
||||||
|
} else {
|
||||||
let left_node = MerkleHashOrchard::from_bytes(&to_array(left_in));
|
let left_node = MerkleHashOrchard::from_bytes(&to_array(left_in));
|
||||||
if left_node.is_some().into() {
|
if left_node.is_some().into() {
|
||||||
if right_in.len() > 1 {
|
if right_in.len() > 1 {
|
||||||
|
@ -1612,6 +1617,7 @@ pub extern "C" fn rust_wrapper_combine_orchard_nodes(
|
||||||
marshall_to_haskell_var(&h0, out, out_len, RW);
|
marshall_to_haskell_var(&h0, out, out_len, RW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
Loading…
Reference in a new issue