script: add tor-test util

This commit is contained in:
darkfi
2024-07-20 12:02:41 +02:00
parent 42458d3780
commit f6786f5b0c
4 changed files with 32 additions and 8 deletions

4
script/node_get-info.py Normal file → Executable file
View File

@@ -1,3 +1,4 @@
#!/usr/bin/python
# This file is part of DarkFi (https://dark.fi)
#
# Copyright (C) 2020-2024 Dyne.org foundation
@@ -16,7 +17,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import asyncio, json, random, sys, time
class JsonRpc:
async def start(self, server, port):
@@ -71,7 +71,6 @@ class JsonRpc:
async def dnet_subscribe_events(self):
return await self._subscribe("dnet.subscribe_events", [])
async def main(argv):
rpc = JsonRpc()
while True:
@@ -121,5 +120,4 @@ async def main(argv):
await rpc.stop()
asyncio.run(main(sys.argv))