33import time
44
55from mypylib .mypylib import color_print , print_table
6- from mytoncore .utils import raw_addr_to_b64
76from mytonctrl .console_cmd import add_command , check_usage_one_arg , check_usage_two_args , check_usage_args_min_max_len
87
98from mytonctrl .utils import GetItemFromList
@@ -184,42 +183,6 @@ def add_controller(self, args):
184183 self .do_add_controller (controller_addr )
185184 color_print ("AddController - {green}OK{endc}" )
186185
187- def do_check_liquid_pool (self ):
188- liquid_pool_addr = self .ton .GetLiquidPoolAddr ()
189- account = self .ton .GetAccount (liquid_pool_addr )
190- history = self .ton .GetAccountHistory (account , 5000 )
191- addrs_list = list ()
192- for message in history :
193- if message .src_addr is None or message .value is None :
194- continue
195- src_addr_full = None
196- if message .src_workchain is not None and message .src_addr is not None :
197- src_addr_full = f"{ message .src_workchain } :{ message .src_addr } "
198- dest_addr_full = None
199- if message .dest_workchain is not None and message .dest_addr is not None :
200- dest_addr_full = f"{ message .dest_workchain } :{ message .dest_addr } "
201- if src_addr_full == account .addr_full :
202- fromto = dest_addr_full
203- else :
204- fromto = src_addr_full
205- if fromto is None :
206- continue
207- fromto = raw_addr_to_b64 (fromto )
208- if fromto not in addrs_list :
209- addrs_list .append (fromto )
210-
211- for controllerAddr in addrs_list :
212- account = self .ton .GetAccount (controllerAddr )
213- version = self .ton .GetVersionFromCodeHash (account .codeHash )
214- if version is None or "controller" not in version :
215- continue
216- print (f"check controller: { controllerAddr } " )
217- self .ton .ControllerUpdateValidatorSet (controllerAddr )
218-
219- def check_liquid_pool (self , args ):
220- self .do_check_liquid_pool ()
221- color_print ("CheckLiquidPool - {green}OK{endc}" )
222-
223186 def do_calculate_loan_amount_test (self ):
224187 min_loan = self .ton .local .db .get ("min_loan" , 41000 )
225188 max_loan = self .ton .local .db .get ("max_loan" , 43000 )
@@ -243,5 +206,4 @@ def add_console_commands(self, console):
243206 add_command (self .local , console , "stop_controller" , self .stop_controller )
244207 add_command (self .local , console , "stop_and_withdraw_controller" , self .stop_and_withdraw_controller )
245208 add_command (self .local , console , "add_controller" , self .add_controller )
246- add_command (self .local , console , "check_liquid_pool" , self .check_liquid_pool )
247209 add_command (self .local , console , "test_calculate_loan_amount" , self .calculate_loan_amount_test )
0 commit comments