Skip to content

Commit

Permalink
feat: single-use event loader
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Nov 28, 2024
1 parent 720affa commit 0db106f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions eth_portfolio/_ledgers/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,7 @@ async def _load_new_objects(self, start_block: Block, end_block: Block) -> Async
await e.load_remaining()
return

if tasks := [
task
async for task in self._transfers.yield_thru_block(end_block)
if start_block <= task.block
]:
if tasks := [task async for task in self._transfers.yield_thru_block(end_block)]:
token_transfers = []
async for token_transfer in a_sync.as_completed(
tasks, aiter=True, tqdm=True, desc=f"Token Transfers {self.address}"
Expand Down

0 comments on commit 0db106f

Please sign in to comment.