The use case is that I would like to call async functions from heartbeat.
It is possible to change update (and I presume query) to async and thereby allow async functions to be made from them. Condvar wait not supported
However the heartbeat function appears to be sync. When I try to add async to heartbeat function definition, I get the following error:
The invocation to the wallet call forward method failed with the error: An error happened during the call: 5: Wasm module of canister sbzkb-zqaaa-aaaaa-aaaiq-cai is not valid: Wasm module has an invalid function signature. Expected return type for ācanister_heartbeatā, got [I32]
#[export_name = ācanister_heartbeatā]
async fn heartbeat_fn () {
ic_cdk::print(āniceā);
}
ā¦
Installing code for canister dfx_hello, with canister_id tzq7c-xqaaa-aaaaa-aaamq-cai
The invocation to the wallet call forward method failed with the error: An error happened during the call: 5: Wasm module of canister tzq7c-xqaaa-aaaaa-aaamq-cai is not valid: Wasm module has an invalid function signature. Expected return type for ācanister_heartbeatā, got [I32].
Did you ever get this sorted? I am trying to get a canister_heartbeat function working right now and Iām hoping to do cross canister calls from it, I hope this works
As an async function, Alarmās hearbeat function is free to call other asynchronous functions (the inner call to ring() above is an example), as well as shared functions of other c
That would be strange if it worked in Motoko but not in Rustā¦