pub async fn incoming_dht_ops_workflow(
    space: &Space,
    sys_validation_trigger: TriggerSender,
    ops: Vec<(DhtOpHash, DhtOp)>,
    request_validation_receipt: bool
) -> WorkflowResult<()>
Examples found in repository?
src/core/sys_validate.rs (line 602)
595
596
597
598
599
600
601
602
603
604
605
606
607
    async fn send_op(
        self,
        record: Record,
        make_op: fn(Record) -> Option<(DhtOpHash, DhtOp)>,
    ) -> SysValidationResult<()> {
        if let Some(op) = make_op(record) {
            let ops = vec![op];
            incoming_dht_ops_workflow(self.space.as_ref(), self.sys_validation_trigger, ops, false)
                .await
                .map_err(Box::new)?;
        }
        Ok(())
    }
More examples
Hide additional examples
src/core/workflow/countersigning_workflow.rs (lines 124-129)
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
pub(crate) async fn countersigning_workflow(
    space: &Space,
    network: &(dyn HolochainP2pDnaT + Send + Sync),
    sys_validation_trigger: &TriggerSender,
) -> WorkflowResult<WorkComplete> {
    // Get any complete sessions.
    let complete_sessions = space.countersigning_workspace.get_complete_sessions();
    let mut notify_agents = Vec::with_capacity(complete_sessions.len());

    // For each complete session send the ops to validation.
    for (agents, ops, actions) in complete_sessions {
        let non_enzymatic_ops: Vec<_> = ops
            .into_iter()
            .filter(|(_hash, dht_op)| dht_op.enzymatic_countersigning_enzyme().is_none())
            .collect();
        if !non_enzymatic_ops.is_empty() {
            incoming_dht_ops_workflow(
                space,
                sys_validation_trigger.clone(),
                non_enzymatic_ops,
                false,
            )
            .await?;
        }
        notify_agents.push((agents, actions));
    }

    // For each complete session notify the agents of success.
    for (agents, actions) in notify_agents {
        if let Err(e) = network
            .countersigning_session_negotiation(
                agents,
                CountersigningSessionNegotiationMessage::AuthorityResponse(actions),
            )
            .await
        {
            // This could likely fail if a signer is offline so it's not really an error.
            tracing::info!(
                "Failed to notify agents: counter signed actions because of {:?}",
                e
            );
        }
    }
    Ok(WorkComplete::Complete)
}