Skip to content

Commit

Permalink
fix: start processing at correct height
Browse files Browse the repository at this point in the history
  • Loading branch information
janezicmatej committed Nov 11, 2024
1 parent b06b4ea commit 38fda26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def run(self, protocol_config: ProtocolProcessingConfig):
protocol_id=protocol_config.protocol_id,
).aggregate(m=Max("block"))["m"]

start = db_processed_height or (self.default_start_height - 1)
# latest hight or default
_start = db_processed_height or (self.default_start_height - 1)
start = _start + 1

logger.info(
f"Processing started for protocol [id:{protocol_config.protocol_id}]."
Expand Down

0 comments on commit 38fda26

Please sign in to comment.