MCPcopy Create free account
hub / github.com/docknetwork/crypto / has_shares_from

Method has_shares_from

oblivious_transfer/src/zero_sharing.rs:129–135  ·  view source on GitHub ↗
(&self, id: &ParticipantId)

Source from the content-addressed store, hash-verified

127 }
128
129 pub fn has_shares_from(&self, id: &ParticipantId) -> Result<bool, OTError> {
130 if !self.cointoss_protocols.contains_key(id) {
131 return Err(OTError::UnexpectedParticipant(*id));
132 }
133 let protocol = self.cointoss_protocols.get(id).unwrap();
134 Ok(protocol.other_shares.contains_key(id))
135 }
136
137 /// Returns true if it has got shares from all other participants that sent commitments.
138 pub fn has_shares_from_all_who_committed(&self) -> bool {

Callers 1

compute_zero_sharesMethod · 0.45

Calls 1

getMethod · 0.80

Tested by

no test coverage detected