mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 05:29:25 +00:00
Update everything which uses dkg to the new APIs
This commit is contained in:
@@ -3,7 +3,7 @@ use std::{
|
||||
time::{SystemTime, Duration},
|
||||
};
|
||||
|
||||
use dkg::{Participant, tests::clone_without};
|
||||
use dkg::Participant;
|
||||
|
||||
use messages::{coordinator::*, SubstrateContext};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{collections::HashMap, time::SystemTime};
|
||||
|
||||
use dkg::{Participant, ThresholdParams, tests::clone_without};
|
||||
use dkg::{Participant, ThresholdParams};
|
||||
|
||||
use serai_client::{
|
||||
primitives::{BlockHash, PublicKey, EXTERNAL_NETWORKS},
|
||||
|
||||
@@ -15,6 +15,15 @@ mod send;
|
||||
pub(crate) const COORDINATORS: usize = 4;
|
||||
pub(crate) const THRESHOLD: usize = ((COORDINATORS * 2) / 3) + 1;
|
||||
|
||||
fn clone_without<K: Clone + core::cmp::Eq + core::hash::Hash, V: Clone>(
|
||||
map: &HashMap<K, V>,
|
||||
without: &K,
|
||||
) -> HashMap<K, V> {
|
||||
let mut res = map.clone();
|
||||
res.remove(without).unwrap();
|
||||
res
|
||||
}
|
||||
|
||||
fn new_test(
|
||||
network: ExternalNetworkId,
|
||||
) -> (Vec<(Handles, <Ristretto as Ciphersuite>::F)>, DockerTest) {
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::{
|
||||
time::{SystemTime, Duration},
|
||||
};
|
||||
|
||||
use dkg::{Participant, tests::clone_without};
|
||||
use dkg::Participant;
|
||||
|
||||
use messages::{sign::SignId, SubstrateContext};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user