aqua-playground/aqua/examples/foldJoin.aqua
2021-07-15 18:08:33 +03:00

18 lines
412 B
Plaintext

import "@fluencelabs/aqua-lib/builtin.aqua"
service Op2("op"):
identity(s: u64)
func getTwoResults(relay: string) -> []u64:
on relay:
k <- Op.string_to_b58(%init_peer_id%)
nodes <- Kademlia.neighborhood(k, nil, nil)
res: *u64
for n <- nodes par:
on n:
try:
res <- Peer.timestamp_sec()
Op2.identity(res!)
Op2.identity(res!1)
Op2.identity(res!2)
<- res