async fn store_deploy(
    deploy: &Deploy,
    node_id: &NodeId,
    network: &mut Network<Reactor>,
    responder: Option<Responder<Result<(), deploy_acceptor::Error>>>,
    rng: &mut TestRng,
) {
    network
        .process_injected_effect_on(node_id, announce_deploy_received(deploy.clone(), responder))
        .await;

    // cycle to deploy acceptor announcement
    network
        .crank_until(
            node_id,
            rng,
            move |event: &ReactorEvent| {
                matches!(
                    event,
                    ReactorEvent::DeployAcceptorAnnouncement(
                        DeployAcceptorAnnouncement::AcceptedNewDeploy { .. },
                    )
                )
            },
            TIMEOUT,
        )
        .await;
}
/// Store a deploy on a target node.
Store a deploy on a target node.
Store a deploy on a target node .
async fn store_deploy(
    deploy: &Deploy,
    node_id: &NodeId,
    network: &mut Network<Reactor>,
    responder: Option<Responder<Result<(), deploy_acceptor::Error>>>,
    rng: &mut TestRng,
) {
    network
        .process_injected_effect_on(node_id, announce_deploy_received(deploy.clone(), responder))
        .await;
    // cycle to deploy acceptor announcement
    network
        .crank_until(
            node_id,
            rng,
            move |event: &ReactorEvent| {
                matches!(
                    event,
                    ReactorEvent::DeployAcceptorAnnouncement(
                        DeployAcceptorAnnouncement::AcceptedNewDeploy { .. },
                    )
                )
            },
            TIMEOUT,
        )
        .await;
}
async fn store_deploy ( deploy : & Deploy , node_id : & NodeId , network : & mut Network < Reactor > , responder : Option < Responder < Result < ( ) , deploy_acceptor :: Error > > > , rng : & mut TestRng , ) { network . process_injected_effect_on ( node_id , announce_deploy_received ( deploy . clone ( ) , responder ) ) . await ; // cycle to deploy acceptor announcement network . crank_until ( node_id , rng , move | event : & ReactorEvent | { matches ! ( event ReactorEvent DeployAcceptorAnnouncement ( DeployAcceptorAnnouncement AcceptedNewDeploy { } ) ) } , TIMEOUT , ) . await ; }
Store a deploy on a target node.
Store a deploy on a target node .
deploy
&Deploy
node_id
&NodeId
network
&mut Network<Reactor>
responder
Option<Responder<Result<(), deploy_acceptor::Error>>>
rng
&mut TestRng
deploy
&Deploy
node_id
&NodeId
network
&mut Network<Reactor>
responder
Option<Responder<Result<(), deploy_acceptor::Error>>>
rng
&mut TestRng