Skip to content

Commit

Permalink
Fix is_block_synced func
Browse files Browse the repository at this point in the history
Signed-off-by: cyc60 <avsysoev60@gmail.com>
  • Loading branch information
cyc60 committed Oct 4, 2023
1 parent 6e4e240 commit 6e89d8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def is_block_synced(block_number: BlockNumber):
chain_head = await consensus_client.get_chain_finalized_head(
settings.network_config.SLOTS_PER_EPOCH
)
return chain_head.execution_block < block_number
return chain_head.execution_block >= block_number


def get_current_timestamp() -> Timestamp:
Expand Down
2 changes: 1 addition & 1 deletion src/exits/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def update_exit_signatures_periodically(
):
oracles = await get_oracles()
update_block = await _fetch_last_update_block()
if update_block and await is_block_synced(update_block):
if update_block and not await is_block_synced(update_block):
logger.info('Waiting for block %d finalization...', update_block)
return
outdated_indexes = await _fetch_outdated_indexes(oracles, update_block)
Expand Down

0 comments on commit 6e89d8f

Please sign in to comment.