mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 03:59:22 +00:00
Tweak the hash_to_point test
It ran for too long and had a "test_" prefix not shared with other tests.
This commit is contained in:
parent
a1599df126
commit
95a4101a9a
1 changed files with 4 additions and 4 deletions
|
@ -2,12 +2,12 @@ use rand::rngs::OsRng;
|
||||||
|
|
||||||
use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
|
use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
|
||||||
|
|
||||||
use crate::{random_scalar, ringct::hash_to_point::{hash_to_point, rust_hash_to_point}};
|
use crate::{random_scalar, ringct::hash_to_point::{hash_to_point as c_hash_to_point, rust_hash_to_point}};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_hash_to_point() {
|
fn hash_to_point() {
|
||||||
for _ in 0 .. 200 {
|
for _ in 0 .. 50 {
|
||||||
let point = &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE;
|
let point = &random_scalar(&mut OsRng) * &ED25519_BASEPOINT_TABLE;
|
||||||
assert_eq!(rust_hash_to_point(point), hash_to_point(point));
|
assert_eq!(rust_hash_to_point(point), c_hash_to_point(point));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue