async fn publish_commitment<S>(
pix_toolbox: &PixToolbox,
msg_sender: &mut S,
routing: &DestinationRouting,
burst: Vec<SsaClientCommitmentMessage<SessionId, HoprPixGroupElement, HoprPixCommitmentProof>>,
quota: &AgreedSsaQuota,
error_context: &'static str,
) -> Result<()>where
S: Sink<(DestinationRouting, ApplicationDataOut)> + Unpin,
S::Error: Error + Send + Sync + Clone + 'static,Expand description
Puts one cycle’s commitment burst on the wire and, only once all of it is out, announces its deposit address.
The order is the point: the deposit must not begin before the Exit holds the complete commitment it derives the deposit key from. If a send fails the burst stops where it is and nothing is announced; the caller still owes the cycle its publication and decides what to do about that. The same goes for an announcement that cannot be queued: the Exit then holds the whole commitment, but the upper layer was never told to fund it.