Skip to content

Commit

Permalink
fix: deduplicate internal transfers in db (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 9, 2024
1 parent 5e61e46 commit 16cbeb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/exporters/treasury_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ async def load_new_txs(start_block: Block, end_block: Block) -> int:
futs = [
asyncio.create_task(insert_treasury_tx(entry))
async for entry in treasury.ledger._get_and_yield(start_block, end_block)
if entry.value
if not isinstance(entry, _Done) and entry.value
]
return sum(await tqdm_asyncio.gather(*futs, desc="Insert Txs to Postgres"))
to_sort = sum(await tqdm_asyncio.gather(*futs, desc="Insert Txs to Postgres"))
return to_sort


# NOTE: Things get sketchy when we bump these higher
Expand Down

0 comments on commit 16cbeb5

Please sign in to comment.