def wait_for_sync_rpc_api(blockchain_service, sleep):
if blockchain_service.is_synced():
return
print('Waiting for the ethereum node to synchronize [Use ^C to exit].')
for i in count():
if i % 3 == 0:
print(CLEARLINE + CURSOR_STARTLINE, end='')
print('.', end='')
sys.stdout.flush()
gevent.sleep(sleep)
if blockchain_service.is_synced():
return
评论列表
文章目录