Kaynağa Gözat

script/node_get_info.py: comment out some prints

x 2 yıl önce
ebeveyn
işleme
8b2c0b76f2
2 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 1 0
      bin/darkirc/src/rpc.rs
  2. 3 3
      script/node_get-info.py

+ 1 - 0
bin/darkirc/src/rpc.rs

@@ -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(),
         }

+ 3 - 3
script/node_get-info.py

@@ -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", [])