diff --git a/charts/asynchronous.py b/charts/asynchronous.py index 4d18f8a..afbe0a1 100644 --- a/charts/asynchronous.py +++ b/charts/asynchronous.py @@ -195,9 +195,9 @@ async def update_xmr_data(yesterday, coin): ) async with aiohttp.ClientSession(**client_args) as session: - for count in range(1, 1400): - block = str(height - count) - actions.append(asyncio.ensure_future(get_block_data(session, block))) + #for count in range(1, 1400): + # block = str(height - count) + # actions.append(asyncio.ensure_future(get_block_data(session, block))) actions.append(asyncio.ensure_future(get_coinmarketcap_data(session, 'xmr', 'USD'))) actions.append(asyncio.ensure_future(get_coinmarketcap_data(session, 'xmr', 'BTC'))) @@ -216,21 +216,21 @@ async def update_xmr_data(yesterday, coin): for response in responses: if response: try: - if response['provider'] == 'localmonero': - date_aux = response['block_header']['timestamp'] - if date_aux == yesterday: - try: - blocksize += int(response['block_header']['size']) - for tx in response['block_header']['txs']: - if tx['coinbase']: - revenue += int(tx['xmr_outputs']) - else: - txs += 1 - fees += int(tx['tx_fee']) - revenue += int(tx['tx_fee']) - success += 1 - except: - errors += 1 + # if response['provider'] == 'localmonero': + # date_aux = response['block_header']['timestamp'] + # if date_aux == yesterday: + # try: + # blocksize += int(response['block_header']['size']) + # for tx in response['block_header']['txs']: + # if tx['coinbase']: + # revenue += int(tx['xmr_outputs']) + # else: + # txs += 1 + # fees += int(tx['tx_fee']) + # revenue += int(tx['tx_fee']) + # success += 1 + # except: + # errors += 1 if response['provider'] == 'coinmarketcap': try: diff --git a/charts/views.py b/charts/views.py index ffb0a1e..fe69572 100644 --- a/charts/views.py +++ b/charts/views.py @@ -1344,7 +1344,7 @@ async def index(request): if update_xmr: count = get_history_function('xmr', yesterday, yesterday) - #await asynchronous.update_xmr_data(yesterday, coin_xmr) + await asynchronous.update_xmr_data(yesterday, coin_xmr) if update_socials: synchronous.check_new_social('Bitcoin')