From d711bb6ff6b134a99076d60ae1d34d7422d9a9e3 Mon Sep 17 00:00:00 2001 From: DieMyst Date: Tue, 5 Sep 2023 12:00:14 +0200 Subject: [PATCH] fix --- aqua-src/antithesis.aqua | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/aqua-src/antithesis.aqua b/aqua-src/antithesis.aqua index 72ac4e01..0bfab158 100644 --- a/aqua-src/antithesis.aqua +++ b/aqua-src/antithesis.aqua @@ -1,12 +1,20 @@ -service Console("run-console"): - print(s: string) +service Hello: + say_hello() -func main(): - ss: *string - dd: *string - peerId = "peerId" - relay = "relay" - parsec s <- ss on peerId via relay: - Console.print(s) - for d <- dd par: - Console.print(d) +func foo(): + on HOST_PEER_ID: + Hello "hello" + + -- This closure will execute on HOST_PEER_ID + closure = (): + Hello.say_hello() + + fn = func (): + Hello.say_hello() + + -- Will go to HOST_PEER_ID, where Hello service is resolved, and call say_hello + closure() + + -- Will be called on current peer, probably INIT_PEER_ID, and may fail + -- in case Hello service is not defined or has another ID + fn() \ No newline at end of file