pub fn canister_can_accept_ingress(handle: IcHandle, ctx: &ic_fondue::pot::Context) {
    let mut rng = ctx.rng.clone();
    let rt = tokio::runtime::Runtime::new().expect("Could not create tokio runtime.");
    rt.block_on({
        async move {
            let endpoint = get_random_node_endpoint(&handle, &mut rng);
            endpoint.assert_ready(ctx).await;
            let agent = assert_create_agent(endpoint.url.as_str()).await;
            let canister = UniversalCanister::new(&agent).await;

            // Explicitly accepts all ingress messages.
            canister
                .update(wasm().set_inspect_message(wasm().accept_message()).reply())
                .await
                .unwrap();

            // Now send the canister an ingress message.  It should succeed.
            canister
                .update(wasm().reply())
                .await
                .expect("should succeed");
        }
    })
}
/// Defining a `canister_inspect_message` that accepts all messages.
Defining a `canister_inspect_message` that accepts all messages.
Defining a ` canister_inspect_message ` that accepts all messages .
pub fn canister_can_accept_ingress(handle: IcHandle, ctx: &ic_fondue::pot::Context) {
    let mut rng = ctx.rng.clone();
    let rt = tokio::runtime::Runtime::new().expect("Could not create tokio runtime.");
    rt.block_on({
        async move {
            let endpoint = get_random_node_endpoint(&handle, &mut rng);
            endpoint.assert_ready(ctx).await;
            let agent = assert_create_agent(endpoint.url.as_str()).await;
            let canister = UniversalCanister::new(&agent).await;
            // Explicitly accepts all ingress messages.
            canister
                .update(wasm().set_inspect_message(wasm().accept_message()).reply())
                .await
                .unwrap();
            // Now send the canister an ingress message.  It should succeed.
            canister
                .update(wasm().reply())
                .await
                .expect("should succeed");
        }
    })
}
pub fn canister_can_accept_ingress ( handle : IcHandle , ctx : & ic_fondue :: pot :: Context ) { let mut rng = ctx . rng . clone ( ) ; let rt = tokio :: runtime :: Runtime :: new ( ) . expect ( " " ) ; rt . block_on ( { async move { let endpoint = get_random_node_endpoint ( & handle , & mut rng ) ; endpoint . assert_ready ( ctx ) . await ; let agent = assert_create_agent ( endpoint . url . as_str ( ) ) . await ; let canister = UniversalCanister :: new ( & agent ) . await ; // Explicitly accepts all ingress messages. canister . update ( wasm ( ) . set_inspect_message ( wasm ( ) . accept_message ( ) ) . reply ( ) ) . await . unwrap ( ) ; // Now send the canister an ingress message.  It should succeed. canister . update ( wasm ( ) . reply ( ) ) . await . expect ( " " ) ; } } ) }
Defining a `canister_inspect_message` that accepts all messages.
Defining a ` canister_inspect_message ` that accepts all messages .
handle
IcHandle
ctx
&ic_fondue::pot::Context
handle
IcHandle
ctx
&ic_fondue::pot::Context