mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
script/node_get_info.py: comment out some prints
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
|
||||
@@ -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", [])
|
||||
|
||||
Reference in New Issue
Block a user