diff --git a/doc/uml/network.png b/doc/uml/network.png new file mode 100644 index 0000000000000000000000000000000000000000..853e39c21f10c5fabcb74d702194ce1822209727 Binary files /dev/null and b/doc/uml/network.png differ diff --git a/doc/uml/network.pu b/doc/uml/network.pu new file mode 100644 index 0000000000000000000000000000000000000000..d89859f85bb60f8291a322f6bab241ccc3cd0a02 --- /dev/null +++ b/doc/uml/network.pu @@ -0,0 +1,36 @@ +@startuml + +Network -->o Node : Connect to node_received() +Network -> Node : Starts network discovery +activate Node +Node -> QNetworkManager : HTTP GET peering/peers?leaves=true +create QNetworkReply +QNetworkManager -> QNetworkReply : Instantiate +Node <- QNetworkManager : QNetworkReply +Node -->o QNetworkReply : Connect to finished() +Network <- Node +deactivate Node +... Request is processed ... +Node <-- QNetworkReply : finished() +destroy QNetworkReply +alt "root" hash changed +loop "for all leaves changed" +activate Node +Node -> QNetworkManager : HTTP GET peering/peers/leaf=leaf_hash +create QNetworkReply +QNetworkManager -> QNetworkReply : Instantiate +Node <- QNetworkManager : QNetworkReply +Node -->o QNetworkReply : Connect to finished() +end +end +... Requests is processed ... +Node <-- QNetworkReply : finished() +destroy QNetworkReply +Network <-- Node : node_received() +ref over Network +New node is instanciated +if pubkey not known yet. +It starts it's own +network discovery +end ref +@enduml \ No newline at end of file diff --git a/src/cutecoin/core/net/api/bma/__init__.py b/src/cutecoin/core/net/api/bma/__init__.py index ec216c55dac2bf92e99be21f7c213137ebecf4d9..e2ff659d9e4d35c29b50525d17951d0368d39f90 100644 --- a/src/cutecoin/core/net/api/bma/__init__.py +++ b/src/cutecoin/core/net/api/bma/__init__.py @@ -88,8 +88,10 @@ class API(object): Arguments: - `path`: the request path """ - - request = QNetworkRequest(self.reverse_url(path)) + url = QUrlQuery(self.reverse_url(path)) + for k,v in kwargs.items(): + url.addQueryItem(k, v); + request = QNetworkRequest(url) reply = request.get(self.reverse_url(path), params=kwargs, headers=self.headers, timeout=15)