Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
update tables for moonbase alpha
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <[email protected]>
  • Loading branch information
noslav committed Feb 16, 2023
1 parent 9a7681e commit cd53682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dbmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __main_loop(self):
with conn.cursor() as cur:
# we are catching up. So we only need to grab what we need to attempt for finalizing
cur.execute(
r'SELECT * FROM reports.proof_chain_moonbase_alpha WHERE observer_chain_session_start_block_id > %s AND observer_chain_finalization_tx_hash IS NULL;',
r'SELECT * FROM chain_moonbeam_mainnet._proof_chain_events WHERE observer_chain_session_start_block_id > %s AND observer_chain_finalization_tx_hash IS NULL;',
(self.last_block_id,))

outputs = cur.fetchall()
Expand All @@ -91,7 +91,7 @@ def __main_loop(self):
self.logger.info(f"Incremental scan block_id={self.last_block_id}")
# we need everything after last max block number
cur.execute(
r'SELECT * FROM reports.proof_chain_moonbase_alpha WHERE observer_chain_session_start_block_id > %s;',
r'SELECT * FROM chain_moonbeam_mainnet._proof_chain_events WHERE observer_chain_session_start_block_id > %s;',
(self.last_block_id,))
outputs = cur.fetchall()

Expand Down Expand Up @@ -123,7 +123,7 @@ def __fetch_last_block(self):
self.logger.info("Determining initial cursor position...")
with self.__connect() as conn:
with conn.cursor() as cur:
cur.execute(r'SELECT observer_chain_session_start_block_id FROM reports.proof_chain_moonbase_alpha WHERE observer_chain_finalization_tx_hash IS NULL LIMIT 1')
cur.execute(r'SELECT observer_chain_session_start_block_id FROM chain_moonbeam_mainnet._proof_chain_events WHERE observer_chain_finalization_tx_hash IS NULL LIMIT 1')
block_id = cur.fetchone()
if block_id is not None:
self.last_block_id = block_id[0] - 1
Expand Down

0 comments on commit cd53682

Please sign in to comment.