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