slightly time optimization

pull/617/head
Yhtyyar Sahatov 2022-03-22 17:26:59 +03:00
rodzic ee0f22cff2
commit e82e255709
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -304,7 +304,7 @@ def populate_with_events(
.all()
)
txs_to_populate = [tx[0] for tx in txs]
txs_to_populate = {tx[0] for tx in txs}
block_timestamps = {tx[1]: tx[2] for tx in txs}
logger.info(f"Theoretically {len(txs_to_populate)} transactions to populate")
@ -320,6 +320,7 @@ def populate_with_events(
current_block,
batch_end,
)
logger.info(f"Fetched {len(raw_events)} events")
for raw_event in raw_events:
if raw_event["transactionHash"] not in txs_to_populate:
continue