mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Document a pair of panics requiring 256 GB of RAM/4 GB of a context
This commit is contained in:
@@ -31,6 +31,8 @@ pub fn clone_without<K: Clone + std::cmp::Eq + std::hash::Hash, V: Clone>(
|
||||
}
|
||||
|
||||
/// Recover the secret from a collection of keys.
|
||||
///
|
||||
/// This will panic if no keys, an insufficient amount of keys, or the wrong keys are provided.
|
||||
pub fn recover_key<C: Ciphersuite>(keys: &HashMap<Participant, ThresholdKeys<C>>) -> C::F {
|
||||
let first = keys.values().next().expect("no keys provided");
|
||||
assert!(keys.len() >= first.params().t().into(), "not enough keys provided");
|
||||
|
||||
Reference in New Issue
Block a user