Skip to content

Commit 6b43862

Browse files
committed
do not send balance alert when out of sync
1 parent 23f7f72 commit 6b43862

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/alert_bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def check_db_usage(self):
209209
def check_validator_wallet_balance(self):
210210
if not self.ton.using_validator():
211211
return
212+
validator_status = self.ton.GetValidatorStatus()
213+
if not validator_status.is_working or validator_status.out_of_sync >= 20:
214+
return
212215
validator_wallet = self.ton.GetValidatorWallet()
213216
validator_account = self.ton.GetAccount(validator_wallet.addrB64)
214217
if validator_account.balance < 10:

0 commit comments

Comments
 (0)