mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
convert from ripple::Json to boost::json
This commit is contained in:
8
test.py
8
test.py
@@ -12,7 +12,7 @@ import threading
|
||||
|
||||
|
||||
|
||||
async def ping(ip, port):
|
||||
async def account_info(ip, port):
|
||||
address = 'ws://' + str(ip) + ':' + str(port)
|
||||
try:
|
||||
async with websockets.connect(address) as ws:
|
||||
@@ -26,7 +26,7 @@ async def ping(ip, port):
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description='test script for xrpl-reporting')
|
||||
parser.add_argument('action', choices=["ping"])
|
||||
parser.add_argument('action', choices=["account_info"])
|
||||
parser.add_argument('--ip', default='127.0.0.1')
|
||||
parser.add_argument('--port', default='8080')
|
||||
|
||||
@@ -36,9 +36,9 @@ args = parser.parse_args()
|
||||
|
||||
def run(args):
|
||||
asyncio.set_event_loop(asyncio.new_event_loop())
|
||||
if args.action == "ping":
|
||||
if args.action == "account_info":
|
||||
asyncio.get_event_loop().run_until_complete(
|
||||
ping(args.ip, args.port))
|
||||
account_info(args.ip, args.port))
|
||||
else:
|
||||
print("incorrect arguments")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user