pub async fn check_and_hold_store_element<F>(
    hash: &HeaderHash,
    workspace: &mut SysValidationWorkspace,
    network: AIngleP2pCell,
    incoming_sgd_ops_sender: Option<IncomingSgdOpSender>,
    f: F,
) -> SysValidationResult<()>
where
    F: FnOnce(&Element) -> SysValidationResult<()>,
{
    let source = check_and_hold(hash, workspace, network).await?;
    f(source.as_ref())?;
    if let (Some(incoming_sgd_ops_sender), Source::Network(element)) =
        (incoming_sgd_ops_sender, source)
    {
        incoming_sgd_ops_sender.send_store_element(element).await?;
    }
    Ok(())
}
/// If we are not holding this header then
/// retrieve it and send it as a StoreElement SgdOp
/// to our incoming_sgd_ops_workflow.
///
/// Apply a checks callback to the Element.
///
/// Additionally sys validation will be triggered to
/// run again if we weren't holding it.
If we are not holding this header then
retrieve it and send it as a StoreElement SgdOp
to our incoming_sgd_ops_workflow.

Apply a checks callback to the Element.

Additionally sys validation will be triggered to
run again if we weren't holding it.
If we are not holding this header then retrieve it and send it as a StoreElement SgdOp to our incoming_sgd_ops_workflow . Apply a checks callback to the Element . Additionally sys validation will be triggered to run again if we weren ' t holding it .
pub async fn check_and_hold_store_element<F>(
    hash: &HeaderHash,
    workspace: &mut SysValidationWorkspace,
    network: AIngleP2pCell,
    incoming_sgd_ops_sender: Option<IncomingSgdOpSender>,
    f: F,
) -> SysValidationResult<()>
where
    F: FnOnce(&Element) -> SysValidationResult<()>,
{
    let source = check_and_hold(hash, workspace, network).await?;
    f(source.as_ref())?;
    if let (Some(incoming_sgd_ops_sender), Source::Network(element)) =
        (incoming_sgd_ops_sender, source)
    {
        incoming_sgd_ops_sender.send_store_element(element).await?;
    }
    Ok(())
}
pub async fn check_and_hold_store_element < F > ( hash : & HeaderHash , workspace : & mut SysValidationWorkspace , network : AIngleP2pCell , incoming_sgd_ops_sender : Option < IncomingSgdOpSender > , f : F , ) -> SysValidationResult < ( ) > where F : FnOnce ( & Element ) -> SysValidationResult < ( ) > , { let source = check_and_hold ( hash , workspace , network ) . await ? ; f ( source . as_ref ( ) ) ? ; if let ( Some ( incoming_sgd_ops_sender ) , Source :: Network ( element ) ) = ( incoming_sgd_ops_sender , source ) { incoming_sgd_ops_sender . send_store_element ( element ) . await ? ; } Ok ( ( ) ) }
If we are not holding this header then
retrieve it and send it as a StoreElement SgdOp
to our incoming_sgd_ops_workflow.
If we are not holding this header then retrieve it and send it as a StoreElement SgdOp to our incoming_sgd_ops_workflow .
hash
&HeaderHash
workspace
&mut SysValidationWorkspace
network
AIngleP2pCell
incoming_sgd_ops_sender
Option<IncomingSgdOpSender>
f
F
hash
&HeaderHash
workspace
&mut SysValidationWorkspace
network
AIngleP2pCell
incoming_sgd_ops_sender
Option<IncomingSgdOpSender>
f
F