fix: fixes tests to use bigInts in multiHash

This commit is contained in:
Kobi Gurkan
2019-05-11 22:13:17 +03:00
parent c5e4b37fc3
commit b20e12bade

View File

@@ -33,7 +33,7 @@ let build_merkle_tree_example = (n_levels, identity_commitment) => {
let current_element = identity_commitment;
for (let i = 0; i < n_levels; i++) {
path_elements.push(bigInt(0));
current_element = mimc7.multiHash([ current_element, 0 ]);
current_element = mimc7.multiHash([ bigInt(current_element), bigInt(0) ]);
path_index.push(current_index % 2);
current_index = Math.floor(current_index / 2);