Skip to content

Commit

Permalink
feat: filter 0 value transfers from treasury export (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Apr 8, 2024
1 parent a07e5bd commit 1739e85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/exporters/treasury_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ def main() -> NoReturn:

@a_sync(default='sync')
async def load_new_txs(start_block: Block, end_block: Block) -> int:
futs = []
async for entry in treasury.ledger._get_and_yield(start_block, end_block):
futs.append(asyncio.create_task(insert_treasury_tx(entry)))
futs = [
asyncio.create_task(insert_treasury_tx(entry))
async for entry in treasury.ledger._get_and_yield(start_block, end_block)
if entry.value
]
return sum(await tqdm_asyncio.gather(*futs, desc="Insert Txs to Postgres"))


Expand Down

0 comments on commit 1739e85

Please sign in to comment.