diff --git a/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.findSubscribers.air b/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.findSubscribers.air index c3ebb1145d..861360fe7c 100644 --- a/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.findSubscribers.air +++ b/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.findSubscribers.air @@ -5,38 +5,40 @@ (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-) (call %init_peer_id% ("getDataSrv" "topic") [] topic) ) - (xor - (seq + (new $res + (xor (seq (seq - (call -relay- ("op" "string_to_b58") [topic] k) - (call -relay- ("kad" "neighborhood") [k [] []] nodes) - ) - (par (seq - (fold nodes n - (par - (seq - (xor - (seq - (call n ("peer" "timestamp_sec") [] t) - (call n ("aqua-dht" "get_values") [topic t] $res) + (call -relay- ("op" "string_to_b58") [topic] k) + (call -relay- ("kad" "neighborhood") [k [] []] nodes) + ) + (par + (seq + (fold nodes n + (par + (seq + (xor + (seq + (call n ("peer" "timestamp_sec") [] t) + (call n ("aqua-dht" "get_values") [topic t] $res) + ) + (null) ) - (null) + (call -relay- ("op" "noop") []) ) - (call -relay- ("op" "noop") []) + (next n) ) - (next n) ) + (call -relay- ("op" "noop") []) ) - (call -relay- ("op" "noop") []) + (null) ) - (null) ) + (call -relay- ("aqua-dht" "merge_two") [$res.$.[0].result! $res.$.[1].result!] v) ) - (call -relay- ("aqua-dht" "merge_two") [$res.$.[0].result! $res.$.[1].result!] v) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) ) ) (xor diff --git a/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.initTopicAndSubscribeBlocking.air b/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.initTopicAndSubscribeBlocking.air index a90056ec97..39267a9e24 100644 --- a/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.initTopicAndSubscribeBlocking.air +++ b/particle-node/tests/builtins/tests/src/aqua_dht/aqua/pubsub.initTopicAndSubscribeBlocking.air @@ -14,65 +14,70 @@ ) (call %init_peer_id% ("getDataSrv" "service_id") [] service_id) ) - (xor - (par - (seq - (seq - (call -relay- ("op" "string_to_b58") [topic] k) - (call -relay- ("kad" "neighborhood") [k [] []] nodes) - ) - (call %init_peer_id% ("op" "noop") []) - ) - (seq - (fold nodes n - (par + (new $results + (seq + (xor + (par + (seq (seq - (seq - (call -relay- ("op" "noop") []) - (xor + (call -relay- ("op" "string_to_b58") [topic] k) + (call -relay- ("kad" "neighborhood") [k [] []] nodes) + ) + (call %init_peer_id% ("op" "noop") []) + ) + (seq + (fold nodes n + (par + (seq (seq - (seq - (seq - (call n ("peer" "timestamp_sec") [] t) - (call n ("aqua-dht" "register_key") [topic t false 0]) - ) - (call n ("aqua-dht" "put_value") [topic value t relay_id service_id 0] result) - ) + (call -relay- ("op" "noop") []) (xor - (match result.$.success! true - (xor + (seq + (seq (seq - (seq - (ap result $results) - (call -relay- ("op" "noop") []) - ) + (call n ("peer" "timestamp_sec") [] t) + (call n ("aqua-dht" "register_key") [topic t false 0]) + ) + (call n ("aqua-dht" "put_value") [topic value t relay_id service_id 0] result) + ) + (xor + (match result.$.success! true (xor - (call %init_peer_id% ("callbackSrv" "progress") [n]) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) + (seq + (seq + (ap result $results) + (call -relay- ("op" "noop") []) + ) + (xor + (call %init_peer_id% ("callbackSrv" "progress") [n]) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) + ) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) ) ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) + (null) ) ) (null) ) ) - (null) + (call %init_peer_id% ("op" "noop") []) ) + (next n) ) - (call %init_peer_id% ("op" "noop") []) ) - (next n) + (call %init_peer_id% ("op" "noop") []) ) ) - (call %init_peer_id% ("op" "noop") []) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) ) + (call %init_peer_id% ("op" "identity") [$results.$.[0]!] results-fix) ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 3]) ) ) (xor - (call %init_peer_id% ("callbackSrv" "response") [$results.$.[0]!]) + (call %init_peer_id% ("callbackSrv" "response") [results-fix]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 4]) ) )