Skip to content

Commit

Permalink
Use poseidon_hash_two instead of poseidon_hash_many.
Browse files Browse the repository at this point in the history
  • Loading branch information
feltroidprime committed Dec 5, 2024
1 parent d329219 commit 7b396f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/utreexo/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ pub mod vanilla {
}
pub mod test;

use core::hash::{HashStateTrait, HashStateExTrait};
use core::poseidon::PoseidonTrait;
use core::poseidon::hades_permutation;

/// Parent hash of two Utreexo nodes.
#[inline]
fn parent_hash(left: felt252, right: felt252) -> felt252 {
return PoseidonTrait::new().update_with(left).update_with(right).finalize();
let (res, _, _) = hades_permutation(left, right, 2);
return res;
}

0 comments on commit 7b396f4

Please sign in to comment.