pub struct DkgSession {
pub threshold: u32,
pub party_count: u32,
pub contributions: HashMap<u32, DkgContribution>,
}Expand description
DKG session state.
Fields§
§threshold: u32§party_count: u32§contributions: HashMap<u32, DkgContribution>Implementations§
Source§impl DkgSession
impl DkgSession
pub fn new(threshold: u32, party_count: u32) -> Self
pub fn submit(&mut self, contrib: DkgContribution) -> Result<(), String>
pub fn is_complete(&self) -> bool
pub fn contribution_count(&self) -> usize
pub fn missing_parties(&self) -> Vec<u32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DkgSession
impl RefUnwindSafe for DkgSession
impl Send for DkgSession
impl Sync for DkgSession
impl Unpin for DkgSession
impl UnsafeUnpin for DkgSession
impl UnwindSafe for DkgSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more