@@ -597,7 +597,7 @@ def PrintTonStatus(local, startWorkTime, totalValidators, onlineValidators, shar
597597 print ()
598598#end define
599599
600- def PrintLocalStatus (local , adnlAddr , validatorIndex , validatorEfficiency , validatorWallet , validatorAccount , validatorStatus , dbSize , dbUsage , memoryInfo , swapInfo , netLoadAvg , disksLoadAvg , disksLoadPercentAvg ):
600+ def PrintLocalStatus (local , adnlAddr , validatorIndex , validatorEfficiency , validatorWallet , validatorAccount , validator_status , dbSize , dbUsage , memoryInfo , swapInfo , netLoadAvg , disksLoadAvg , disksLoadPercentAvg ):
601601 if validatorWallet is None :
602602 return
603603 walletAddr = validatorWallet .addrB64
@@ -610,7 +610,6 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
610610 netLoad1 = netLoadAvg [0 ]
611611 netLoad5 = netLoadAvg [1 ]
612612 netLoad15 = netLoadAvg [2 ]
613- validatorOutOfSync = validatorStatus .get ("outOfSync" )
614613
615614 validatorIndex_text = GetColorInt (validatorIndex , 0 , logic = "more" )
616615 validatorIndex_text = local .translate ("local_status_validator_index" ).format (validatorIndex_text )
@@ -671,11 +670,12 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
671670 validatorUptime = get_service_uptime ("validator" )
672671 mytoncoreUptime_text = bcolors .green_text (time2human (mytoncoreUptime ))
673672 validatorUptime_text = bcolors .green_text (time2human (validatorUptime ))
674- mytoncoreStatus = GetColorStatus (mytoncoreStatus_bool )
675- validatorStatus = GetColorStatus (validatorStatus_bool )
676- mytoncoreStatus_text = local .translate ("local_status_mytoncore_status" ).format (mytoncoreStatus , mytoncoreUptime_text )
677- validatorStatus_text = local .translate ("local_status_validator_status" ).format (validatorStatus , validatorUptime_text )
678- validatorOutOfSync_text = local .translate ("local_status_validator_out_of_sync" ).format (GetColorInt (validatorOutOfSync , 20 , logic = "less" , ending = " s" ))
673+ mytoncoreStatus_color = GetColorStatus (mytoncoreStatus_bool )
674+ validatorStatus_color = GetColorStatus (validatorStatus_bool )
675+ mytoncoreStatus_text = local .translate ("local_status_mytoncore_status" ).format (mytoncoreStatus_color , mytoncoreUptime_text )
676+ validatorStatus_text = local .translate ("local_status_validator_status" ).format (validatorStatus_color , validatorUptime_text )
677+ validator_out_of_sync_text = local .translate ("local_status_validator_out_of_sync" ).format (GetColorInt (validator_status .out_of_sync , 20 , logic = "less" , ending = " s" ))
678+ validator_out_of_ser_text = local .translate ("local_status_validator_out_of_ser" ).format (GetColorInt (validator_status .out_of_ser , 20 , logic = "less" , ending = " blocks" ))
679679 dbSize_text = GetColorInt (dbSize , 1000 , logic = "less" , ending = " Gb" )
680680 dbUsage_text = GetColorInt (dbUsage , 80 , logic = "less" , ending = "%" )
681681 dbStatus_text = local .translate ("local_status_db" ).format (dbSize_text , dbUsage_text )
@@ -708,7 +708,8 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
708708 print (disksLoad_text )
709709 print (mytoncoreStatus_text )
710710 print (validatorStatus_text )
711- print (validatorOutOfSync_text )
711+ print (validator_out_of_sync_text )
712+ print (validator_out_of_ser_text )
712713 print (dbStatus_text )
713714 print (mtcVersion_text )
714715 print (validatorVersion_text )
@@ -717,7 +718,7 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
717718
718719def GetColorInt (data , border , logic , ending = None ):
719720 if data is None :
720- result = bcolors . green_text ( "n/a" )
721+ result = "n/a"
721722 elif logic == "more" :
722723 if data >= border :
723724 result = bcolors .green_text (data , ending )
@@ -1104,7 +1105,7 @@ def PrintOffersList(ton, args):
11041105 print (text )
11051106 else :
11061107 table = list ()
1107- table += [["Hash" , "Votes" , "W/L" , "Approved" , "Is passed" ]]
1108+ table += [["Hash" , "Config" , " Votes" , "W/L" , "Approved" , "Is passed" ]]
11081109 for item in data :
11091110 hash = item .get ("hash" )
11101111 votedValidators = len (item .get ("votedValidators" ))
@@ -1120,7 +1121,7 @@ def PrintOffersList(ton, args):
11201121 isPassed = bcolors .green_text ("true" )
11211122 if isPassed == False :
11221123 isPassed = bcolors .red_text ("false" )
1123- table += [[hash , votedValidators , wl , approvedPercent_text , isPassed ]]
1124+ table += [[hash , item . config . id , votedValidators , wl , approvedPercent_text , isPassed ]]
11241125 print_table (table )
11251126#end define
11261127
0 commit comments