Skip to content

Commit

Permalink
chore: only process buy direct events after certain height because of…
Browse files Browse the repository at this point in the history
… pruning on redwood RND node
  • Loading branch information
blushi committed Dec 4, 2024
1 parent 7b1d2d8 commit 31c1370
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import textwrap
import requests
from utils import PollingProcess, events_to_process
from utils import PollingProcess, events_to_process, new_events_to_process
from collections import defaultdict

logger = logging.getLogger(__name__)
Expand All @@ -27,9 +27,11 @@ def fetch_project_id(batch_denom):

def _index_orders(pg_conn, _client, _chain_num):
with pg_conn.cursor() as cur:
for event in events_to_process(
for event in new_events_to_process(
cur,
"orders",
_chain_num,
18054990
):
# Dictionary to store events grouped by project_id and ask_denom
events_by_project_and_denom = defaultdict(lambda: defaultdict(list))
Expand Down

0 comments on commit 31c1370

Please sign in to comment.