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

Method receive_commitment

oblivious_transfer/src/zero_sharing.rs:65–76  ·  view source on GitHub ↗

Process received commitments to the shares from another party and store it

(
        &mut self,
        sender_id: ParticipantId,
        commitments: Commitments,
    )

Source from the content-addressed store, hash-verified

63
64 /// Process received commitments to the shares from another party and store it
65 pub fn receive_commitment(
66 &mut self,
67 sender_id: ParticipantId,
68 commitments: Commitments,
69 ) -> Result<(), OTError> {
70 if !self.cointoss_protocols.contains_key(&sender_id) {
71 return Err(OTError::UnexpectedParticipant(sender_id));
72 }
73 let protocol = self.cointoss_protocols.get_mut(&sender_id).unwrap();
74 protocol.receive_commitment(sender_id, commitments)?;
75 Ok(())
76 }
77
78 /// Process a received share from another party, verify it against the commitment receiver earlier
79 /// and store the shares

Callers 1

checkFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected