Adds stdout display when creating dummy appointments

This commit is contained in:
Sergi Delgado Segura
2019-07-11 16:21:05 +02:00
parent 81ebc161c9
commit bed25c03e3

View File

@@ -21,8 +21,8 @@ def show_message(message, debug, logging):
sys.exit(message)
# FIXME: TESTING ENDPOINT, WON'T BE THERE IN PRODUCTION
def generate_dummy_appointment():
# FIXME: TESTING ENDPOINT, WON'T BE THERE IN PRODUCTION
get_block_count_end_point = "http://{}:{}/get_block_count".format(pisa_api_server, pisa_api_port)
r = requests.get(url=get_block_count_end_point, timeout=5)
@@ -32,8 +32,12 @@ def generate_dummy_appointment():
"tx_id": hexlify(os.urandom(32)).decode('utf-8'), "start_time": current_height + 5,
"end_time": current_height + 10, "dispute_delta": 20}
print('Generating dummy appointment data:''\n\n' + json.dumps(dummy_appointment_data, indent=4, sort_keys=True))
json.dump(dummy_appointment_data, open('dummy_appointment_data.json', 'w'))
print('\nData stored in dummy_appointment_data.json')
def add_appointment(args, debug, logging):
appointment_data = None