pub fn canister_accepts_ingress_by_default(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 {
            // Create a canister that does not expose the
            // `canister_inspect_message` method. It should accept ingress
            // messages sent to it.
            let wasm_module = wabt::wat2wasm(
                r#"
                 (module
                 (import "ic0" "msg_reply" (func $msg_reply))

                 (func (export "canister_update hello")
                       (call $msg_reply)
                 )
                 (memory 1)
               )"#,
            )
            .unwrap();

            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_id = create_and_install(&agent, &wasm_module).await;

            // Now send the canister an ingress message.  It should succeed.
            agent
                .update(&canister_id, "hello")
                .call_and_wait(delay())
                .await
                .expect("should succeed");
        }
    })
}
/// Not defining `canister_inspect_message` accepts all ingress messages.
Not defining `canister_inspect_message` accepts all ingress messages.
Not defining ` canister_inspect_message ` accepts all ingress messages .
pub fn canister_accepts_ingress_by_default(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 {
            // Create a canister that does not expose the
            // `canister_inspect_message` method. It should accept ingress
            // messages sent to it.
            let wasm_module = wabt::wat2wasm(
                r#"
                 (module
                 (import "ic0" "msg_reply" (func $msg_reply))
                 (func (export "canister_update hello")
                       (call $msg_reply)
                 )
                 (memory 1)
               )"#,
            )
            .unwrap();
            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_id = create_and_install(&agent, &wasm_module).await;
            // Now send the canister an ingress message.  It should succeed.
            agent
                .update(&canister_id, "hello")
                .call_and_wait(delay())
                .await
                .expect("should succeed");
        }
    })
}
pub fn canister_accepts_ingress_by_default ( 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 { // Create a canister that does not expose the // `canister_inspect_message` method. It should accept ingress // messages sent to it. let wasm_module = wabt :: wat2wasm ( r#"
                 (module
                 (import "ic0" "msg_reply" (func $msg_reply))

                 (func (export "canister_update hello")
                       (call $msg_reply)
                 )
                 (memory 1)
               )"# , ) . unwrap ( ) ; 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_id = create_and_install ( & agent , & wasm_module ) . await ; // Now send the canister an ingress message.  It should succeed. agent . update ( & canister_id , " " ) . call_and_wait ( delay ( ) ) . await . expect ( " " ) ; } } ) }
Not defining `canister_inspect_message` accepts all ingress messages.
Not defining ` canister_inspect_message ` accepts all ingress messages .
handle
IcHandle
ctx
&ic_fondue::pot::Context
handle
IcHandle
ctx
&ic_fondue::pot::Context