diff --git a/src/dexorder/bin/finaldata.py b/src/dexorder/bin/finaldata.py index 85c73c8..505face 100644 --- a/src/dexorder/bin/finaldata.py +++ b/src/dexorder/bin/finaldata.py @@ -26,9 +26,8 @@ ohlcs: FinalOHLCRepository async def handle_backfill_uniswap_swaps(swaps: list[EventData]): # asynchronously prefetch the block timestamps we'll need - block_ids = set(swap['blockHash'] for swap in swaps) - for batch in itertools.batched(block_ids, 4): - await asyncio.gather(*[get_block_timestamp(h) for h in batch]) + block_hashes = set(swap['blockHash'] for swap in swaps) + await asyncio.gather(*[get_block_timestamp(h) for h in block_hashes]) # now execute the swaps synchronously for swap in swaps: diff --git a/src/dexorder/blockchain/connection.py b/src/dexorder/blockchain/connection.py index 3635808..e4aac87 100644 --- a/src/dexorder/blockchain/connection.py +++ b/src/dexorder/blockchain/connection.py @@ -150,3 +150,5 @@ class RetryHTTPProvider (AsyncHTTPProvider): await asyncio.sleep(wait) finally: self.rate_allowed.set() + # finally: + # log.debug(f'Ended request of RPC call {method}')