We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eba5efd commit 24780bcCopy full SHA for 24780bc
timeboost-types/src/decryption.rs
@@ -287,7 +287,7 @@ impl<const N: usize> From<KeyStore> for KeyStoreVec<N> {
287
#[derive(Debug, Clone)]
288
pub struct KeyStore {
289
committee: Committee,
290
- keys: BTreeMap<KeyId, DkgEncKey>,
+ keys: Arc<BTreeMap<KeyId, DkgEncKey>>,
291
}
292
293
impl KeyStore {
@@ -298,10 +298,11 @@ impl KeyStore {
298
{
299
let this = Self {
300
committee: c,
301
- keys: keys
302
- .into_iter()
303
- .map(|(i, k)| (i.into(), k))
304
- .collect::<BTreeMap<_, _>>(),
+ keys: Arc::new(
+ keys.into_iter()
+ .map(|(i, k)| (i.into(), k))
+ .collect::<BTreeMap<_, _>>(),
305
+ ),
306
};
307
308
// basic sanity check
0 commit comments