mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
32 lines
548 B
Plaintext
32 lines
548 B
Plaintext
service Kademlia("kad"):
|
|
neighborhood: -> []string
|
|
|
|
service Peer("peer"):
|
|
timestamp_sec: -> u64
|
|
|
|
service Op2("op"):
|
|
identity: u64 -> u64
|
|
|
|
func getTwoResults(node: string) -> []u64:
|
|
on node:
|
|
nodes <- Kademlia.neighborhood()
|
|
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
|
|
|
|
|
|
func makeArray() -> []u64:
|
|
<- [1, 3, 5]
|
|
|
|
|
|
func makeOption() -> ?u64:
|
|
<- ?[1, 3, 5]
|
|
|
|
func makeStream() -> *u64:
|
|
<- *[1, 3, 5] |