pub async fn stub_network() -> ghost_actor::GhostSender<HolochainP2p> {
    let builder = ghost_actor::actor_builder::GhostActorBuilder::new();

    let channel_factory = builder.channel_factory().clone();

    let sender = channel_factory
        .create_channel::<HolochainP2p>()
        .await
        .unwrap();

    tokio::task::spawn(builder.spawn(StubNetwork));

    sender
}
/// Spawn a stub network that doesn't respond to any messages.
/// Use `test_network()` if you want a real test network.
Spawn a stub network that doesn't respond to any messages.
Use `test_network()` if you want a real test network.
Spawn a stub network that doesn ' t respond to any messages . Use ` test_network () ` if you want a real test network .
pub async fn stub_network() -> ghost_actor::GhostSender<HolochainP2p> {
    let builder = ghost_actor::actor_builder::GhostActorBuilder::new();
    let channel_factory = builder.channel_factory().clone();
    let sender = channel_factory
        .create_channel::<HolochainP2p>()
        .await
        .unwrap();
    tokio::task::spawn(builder.spawn(StubNetwork));
    sender
}
pub async fn stub_network ( ) -> ghost_actor :: GhostSender < HolochainP2p > { let builder = ghost_actor :: actor_builder :: GhostActorBuilder :: new ( ) ; let channel_factory = builder . channel_factory ( ) . clone ( ) ; let sender = channel_factory . create_channel :: < HolochainP2p > ( ) . await . unwrap ( ) ; tokio :: task :: spawn ( builder . spawn ( StubNetwork ) ) ; sender }
Spawn a stub network that doesn't respond to any messages.
Spawn a stub network that doesn ' t respond to any messages .