Skip to content

Commit

Permalink
Merge branch 'master' into kw/switch-to-le
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Jan 28, 2024
2 parents 7ec723f + dbc3167 commit cea9dad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ffi_interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ pub fn get_tree_key_hash(
input[..32].copy_from_slice(&address);
input[32..].copy_from_slice(&tree_index_le);

get_tree_key_hash_flat_input(committer, input)
}
/// Same method as `get_tree_key_hash` but takes a 64 byte input instead of two 32 byte inputs
///
/// This is kept for backwards compatibility and because we have not yet checked if its better
/// for Java to pass in two 32 bytes or one 64 byte input.
///
/// The former probably requires two allocations, while the latter is less type safe.
pub fn get_tree_key_hash_flat_input(committer: &DefaultCommitter, input: [u8; 64]) -> [u8; 32] {
verkle_spec::hash64(committer, input).to_fixed_bytes()
}
pub fn get_tree_key(
Expand Down

0 comments on commit cea9dad

Please sign in to comment.