Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
count = crontab.prepare_events()
print count, "events successfully prepared (stage 1)"
# Step 3 - Submit event (try until success)
print "do_events: Waiting for confirmations"
initial_bc = get_block_count()
wait_for_blocks(crontab.CONFIRMATIONS_REQUIRED,initial_bc)
count = crontab.submit_events()
while count == 0:
print "do_events: Waiting some more..."
wait_for_blocks(1)
count = crontab.submit_events()
print count, "events successfully submitted (stage 2)"
crontab.CONFIRMATIONS_REQUIRED = 1
while True:
do_test()
def do_events():
# Step 2 - Prepare event
count = crontab.prepare_events()
print count, "events successfully prepared (stage 1)"
# Step 3 - Submit event (try until success)
print "do_events: Waiting for confirmations"
initial_bc = get_block_count()
wait_for_blocks(crontab.CONFIRMATIONS_REQUIRED,initial_bc)
count = crontab.submit_events()
while count == 0:
print "do_events: Waiting some more..."
wait_for_blocks(1)
count = crontab.submit_events()
print count, "events successfully submitted (stage 2)"