diff --git a/aqua/pubsub.aqua b/aqua/pubsub.aqua index 7f0cae8..33c300e 100644 --- a/aqua/pubsub.aqua +++ b/aqua/pubsub.aqua @@ -59,7 +59,7 @@ func initTopicAndSubscribeBlocking( result <- AquaDHT.put_value(topic, value, t, relay_id, service_id, 0) if result.success: results <<- result - co progress(n) + progress(n) <- results!0 -- Create a topic and make the given node a subscriber to it diff --git a/example/src/example.ts b/example/src/example.ts index c21f3b6..aace8fa 100644 --- a/example/src/example.ts +++ b/example/src/example.ts @@ -5,8 +5,9 @@ import { initTopicAndSubscribeBlocking, findSubscribers } from "./generated/expo async function main() { // connect to the Fluence network await Fluence.start({ connectTo: krasnodar[1] }); - let topic = "myTopic"; + let topic = "myTopic" + new Date().valueOf(); let value = "myValue"; + console.log("Will create topic", topic); // create topic (if not exists) and subscribe on it let relay = Fluence.getStatus().relayPeerId; await initTopicAndSubscribeBlocking(