This commit is contained in:
akildemir
2023-01-01 15:16:25 +03:00
72 changed files with 2330 additions and 699 deletions

View File

@@ -1,5 +1,5 @@
use core::ops::Deref;
use std::{sync::Mutex, collections::HashSet};
use std::collections::HashSet;
use lazy_static::lazy_static;
@@ -8,6 +8,8 @@ use rand_core::OsRng;
use curve25519_dalek::{constants::ED25519_BASEPOINT_TABLE, scalar::Scalar};
use tokio::sync::Mutex;
use monero_serai::{
Protocol, random_scalar,
wallet::{
@@ -100,7 +102,7 @@ macro_rules! async_sequential {
$(
#[tokio::test]
async fn $name() {
let guard = runner::SEQUENTIAL.lock().unwrap();
let guard = runner::SEQUENTIAL.lock().await;
let local = tokio::task::LocalSet::new();
local.run_until(async move {
if let Err(err) = tokio::task::spawn_local(async move { $body }).await {
@@ -159,6 +161,7 @@ macro_rules! test {
type Builder = SignableTransactionBuilder;
// Run each function as both a single signer and as a multisig
#[allow(clippy::redundant_closure_call)]
for multisig in [false, true] {
// Only run the multisig variant if multisig is enabled
if multisig {
@@ -222,7 +225,7 @@ macro_rules! test {
);
}
frost::tests::sign_without_caching(&mut OsRng, machines, &vec![])
frost::tests::sign_without_caching(&mut OsRng, machines, &[])
}
}
}