From d67b8fe360cdd3ceba2b47d1772ae70e0d4f761d Mon Sep 17 00:00:00 2001 From: Filip Krawczyk Date: Wed, 3 Jan 2024 15:52:33 +0100 Subject: [PATCH] Format --- src/vector_commitment/tests/test_vector_commitment.cairo | 1 + src/vector_commitment/vector_commitment.cairo | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vector_commitment/tests/test_vector_commitment.cairo b/src/vector_commitment/tests/test_vector_commitment.cairo index 26b4a6198..a7de31a8d 100644 --- a/src/vector_commitment/tests/test_vector_commitment.cairo +++ b/src/vector_commitment/tests/test_vector_commitment.cairo @@ -290,3 +290,4 @@ fn test_vector_commitment_decommit() { // TODO: test validate_vector_commitment + diff --git a/src/vector_commitment/vector_commitment.cairo b/src/vector_commitment/vector_commitment.cairo index 14c92c744..3cf35a47f 100644 --- a/src/vector_commitment/vector_commitment.cairo +++ b/src/vector_commitment/vector_commitment.cairo @@ -187,7 +187,7 @@ fn truncated_blake2s(x: felt252, y: felt252) -> felt252 { let mut data = ArrayTrait::::new(); data.append_big_endian(x); data.append_big_endian(y); - + // Truncate hash - convert value to felt, by taking the least significant 160 bits. let hash = blake2s(data).flip_endianness() % 0x10000000000000000000000000000000000000000; hash.try_into().unwrap()