aqua-playground/aqua/examples/passArgs.aqua

24 lines
643 B
Plaintext
Raw Normal View History

2022-06-08 16:22:33 +03:00
import Op from "@fluencelabs/aqua-lib/builtin.aqua"
2021-07-23 11:57:44 +03:00
service AquaDHT("test-dht"):
put_host_value(key: string, value: string, service_id: []string) -> string
func putHostValue(key: string, value: string, service_id: ?string) -> string:
res <- AquaDHT.put_host_value(key, value, service_id)
<- res
func create_client_util(service_id: string) -> string:
res <- putHostValue("client-util", service_id, nil)
2022-06-08 16:22:33 +03:00
<- res
func wait(successful: *bool, n: i16):
join successful[n - 1]
func bugLNG60(node: string) -> bool:
successful: *bool
nodes = [node]
for n <- nodes:
successful <<- true
wait(successful, 1)
<- true