Function holochain::core::check_valid_if_dna
source · pub async fn check_valid_if_dna(
action: &Action,
workspace: &SysValidationWorkspace
) -> SysValidationResult<()>
Expand description
Check that Dna actions are only added to empty source chains
Examples found in repository?
src/core/workflow/sys_validation_workflow.rs (line 569)
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582
async fn register_agent_activity(
action: &Action,
workspace: &SysValidationWorkspace,
network: HolochainP2pDna,
incoming_dht_ops_sender: Option<IncomingDhtOpSender>,
) -> SysValidationResult<()> {
// Get data ready to validate
let prev_action_hash = action.prev_action();
// Checks
check_prev_action(action)?;
check_valid_if_dna(action, workspace).await?;
if let Some(prev_action_hash) = prev_action_hash {
check_and_hold_register_agent_activity(
prev_action_hash,
workspace,
network,
incoming_dht_ops_sender,
|_| Ok(()),
)
.await?;
}
check_chain_rollback(action, workspace).await?;
Ok(())
}