script/node_get_info.py: comment out some prints

This commit is contained in:
x
2023-08-30 13:29:27 +02:00
parent 113978a6d4
commit 8b2c0b76f2
2 changed files with 4 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ impl RequestHandler for JsonRpcInterface {
"ping" => self.pong(req.id, req.params).await,
"dnet.switch" => self.dnet_switch(req.id, req.params).await,
"dnet.subscribe_events" => self.dnet_subscribe_events(req.id, req.params).await,
// TODO: make this optional
"p2p.get_info" => self.p2p_get_info(req.id, req.params).await,
_ => JsonError::new(ErrorCode::MethodNotFound, None, req.id).into(),
}

View File

@@ -30,7 +30,7 @@ class JsonRpc:
async def _make_request(self, method, params):
ident = random.randint(0, 2**16)
print(ident)
#print(ident)
request = {
"jsonrpc": "2.0",
"method": method,
@@ -45,7 +45,7 @@ class JsonRpc:
data = await self.reader.readline()
message = data.decode().strip()
response = json.loads(message)
print(response)
#print(response)
return response
async def _subscribe(self, method, params):
@@ -60,7 +60,7 @@ class JsonRpc:
message = json.dumps(request) + "\n"
self.writer.write(message.encode())
await self.writer.drain()
print("Subscribed")
#print("Subscribed")
async def ping(self):
return await self._make_request("ping", [])