Skip to content

Commit

Permalink
alt: check ALT before destroing
Browse files Browse the repository at this point in the history
  • Loading branch information
afalaleev committed Jun 11, 2024
1 parent 00234d8 commit a15659e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/executor/alt_destroyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,13 @@ async def _destroy_alt_queue(self) -> None:
self._alt_queue = deque(new_destroy_queue)

async def _destroy_alt(self, alt: _NeonAltInfo, slot: int) -> int:
acct = await self._sol_client.get_alt_account(alt.sol_alt.address, SolCommit.Finalized)
acct = await self._sol_client.get_alt_account(alt.sol_alt.address, SolCommit.Confirmed)
if acct.is_empty:
msg = log_msg("done destroy ALT {Address} (owner {Owner}, NeonTx {TxHash})", **alt.info)
_LOG.debug(msg)
return 0

acct = await self._sol_client.get_alt_account(alt.sol_alt.address, SolCommit.Finalized)
if alt.attempt_cnt >= 1024:
msg = log_msg("too many attempts to destroy ALT {Address} (owner {Owner}, NeonTx {TxHash})", **alt.info)
_LOG.warning(msg)
Expand Down

0 comments on commit a15659e

Please sign in to comment.