@@ -551,6 +551,8 @@ def PrintStatus(local, ton, args):
551551 disks_load_percent_avg = ton .GetStatistics ("disksLoadPercentAvg" , statistics )
552552
553553 all_status = validator_status .is_working == True and validator_status .out_of_sync < 20
554+ config15 = None
555+
554556 if all_status :
555557 network_name = ton .GetNetworkName ()
556558 rootWorkchainEnabledTime_int = ton .GetRootWorkchainEnabledTime ()
@@ -588,7 +590,7 @@ def PrintStatus(local, ton, args):
588590 if all_status :
589591 PrintTonStatus (local , network_name , startWorkTime , totalValidators , onlineValidators , shardsNumber , offersNumber , complaintsNumber , tpsAvg )
590592 PrintLocalStatus (local , adnl_addr , validator_index , validator_efficiency , validator_wallet , validator_account , validator_status ,
591- db_size , db_usage , memory_info , swap_info , net_load_avg , disks_load_avg , disks_load_percent_avg )
593+ db_size , db_usage , memory_info , swap_info , net_load_avg , disks_load_avg , disks_load_percent_avg , config15 )
592594 if all_status :
593595 PrintTonConfig (local , fullConfigAddr , fullElectorAddr , config15 , config17 )
594596 PrintTimes (local , rootWorkchainEnabledTime_int , startWorkTime , oldStartWorkTime , config15 )
@@ -638,7 +640,7 @@ def PrintTonStatus(local, network_name, startWorkTime, totalValidators, onlineVa
638640 print ()
639641#end define
640642
641- def PrintLocalStatus (local , adnlAddr , validatorIndex , validatorEfficiency , validatorWallet , validatorAccount , validator_status , dbSize , dbUsage , memoryInfo , swapInfo , netLoadAvg , disksLoadAvg , disksLoadPercentAvg ):
643+ def PrintLocalStatus (local , adnlAddr , validatorIndex , validatorEfficiency , validatorWallet , validatorAccount , validator_status , dbSize , dbUsage , memoryInfo , swapInfo , netLoadAvg , disksLoadAvg , disksLoadPercentAvg , config15 ):
642644 if validatorWallet is None :
643645 return
644646 walletAddr = validatorWallet .addrB64
@@ -716,7 +718,14 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
716718 mytoncoreStatus_text = local .translate ("local_status_mytoncore_status" ).format (mytoncoreStatus_color , mytoncoreUptime_text )
717719 validatorStatus_text = local .translate ("local_status_validator_status" ).format (validatorStatus_color , validatorUptime_text )
718720 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" ))
719- 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" ))
721+
722+ validator_out_of_ser_text = local .translate ("local_status_validator_out_of_ser" ).format (f'{ validator_status .out_of_ser } blocks ago' )
723+
724+ if config15 :
725+ t = config15 ["validatorsElectedFor" ] * 2
726+ if validator_status .out_of_ser * 5 > t :
727+ validator_out_of_ser_text = local .translate ("local_status_validator_out_of_ser" ).format (f'{{redc}}{ validator_status .out_of_ser } blocks ago{{endc}}' )
728+
720729 dbSize_text = GetColorInt (dbSize , 1000 , logic = "less" , ending = " Gb" )
721730 dbUsage_text = GetColorInt (dbUsage , 80 , logic = "less" , ending = "%" )
722731 dbStatus_text = local .translate ("local_status_db" ).format (dbSize_text , dbUsage_text )
0 commit comments