@@ -83,6 +83,7 @@ def __init__(self, ton, local, *args, **kwargs):
8383 self .validator_module = None
8484 self .inited = False
8585 self .hostname = None
86+ self .ip = None
8687 self .token = None
8788 self .chat_id = None
8889 self .last_db_check = 0
@@ -113,6 +114,7 @@ def send_alert(self, alert_name: str, *args, **kwargs):
113114❗️ <b>MyTonCtrl Alert { alert_name } </b> ❗️
114115
115116Hostname: <code>{ self .hostname } </code>
117+ Node IP: <code>{ self .ip } </code>
116118Time: <code>{ time_ } </code> (<code>{ int (time .time ())} </code>)
117119Severity: <code>{ alert .severity } </code>
118120
@@ -140,6 +142,7 @@ def init(self):
140142 from modules .validator import ValidatorModule
141143 self .validator_module = ValidatorModule (self .ton , self .local )
142144 self .hostname = get_hostname ()
145+ self .ip = self .ton .get_validator_engine_ip ()
143146 self .set_global_vars ()
144147 self .inited = True
145148
@@ -206,6 +209,9 @@ def check_db_usage(self):
206209 def check_validator_wallet_balance (self ):
207210 if not self .ton .using_validator ():
208211 return
212+ validator_status = self .ton .GetValidatorStatus ()
213+ if not validator_status .is_working or validator_status .out_of_sync >= 20 :
214+ return
209215 validator_wallet = self .ton .GetValidatorWallet ()
210216 validator_account = self .ton .GetAccount (validator_wallet .addrB64 )
211217 if validator_account .balance < 10 :
0 commit comments