@@ -597,7 +597,7 @@ def PrintTonStatus(local, startWorkTime, totalValidators, onlineValidators, shar
597
597
print ()
598
598
#end define
599
599
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 ):
601
601
if validatorWallet is None :
602
602
return
603
603
walletAddr = validatorWallet .addrB64
@@ -610,7 +610,6 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
610
610
netLoad1 = netLoadAvg [0 ]
611
611
netLoad5 = netLoadAvg [1 ]
612
612
netLoad15 = netLoadAvg [2 ]
613
- validatorOutOfSync = validatorStatus .get ("outOfSync" )
614
613
615
614
validatorIndex_text = GetColorInt (validatorIndex , 0 , logic = "more" )
616
615
validatorIndex_text = local .translate ("local_status_validator_index" ).format (validatorIndex_text )
@@ -671,11 +670,12 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
671
670
validatorUptime = get_service_uptime ("validator" )
672
671
mytoncoreUptime_text = bcolors .green_text (time2human (mytoncoreUptime ))
673
672
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" ))
679
679
dbSize_text = GetColorInt (dbSize , 1000 , logic = "less" , ending = " Gb" )
680
680
dbUsage_text = GetColorInt (dbUsage , 80 , logic = "less" , ending = "%" )
681
681
dbStatus_text = local .translate ("local_status_db" ).format (dbSize_text , dbUsage_text )
@@ -708,7 +708,8 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
708
708
print (disksLoad_text )
709
709
print (mytoncoreStatus_text )
710
710
print (validatorStatus_text )
711
- print (validatorOutOfSync_text )
711
+ print (validator_out_of_sync_text )
712
+ print (validator_out_of_ser_text )
712
713
print (dbStatus_text )
713
714
print (mtcVersion_text )
714
715
print (validatorVersion_text )
@@ -717,7 +718,7 @@ def PrintLocalStatus(local, adnlAddr, validatorIndex, validatorEfficiency, valid
717
718
718
719
def GetColorInt (data , border , logic , ending = None ):
719
720
if data is None :
720
- result = bcolors . green_text ( "n/a" )
721
+ result = "n/a"
721
722
elif logic == "more" :
722
723
if data >= border :
723
724
result = bcolors .green_text (data , ending )
@@ -1104,7 +1105,7 @@ def PrintOffersList(ton, args):
1104
1105
print (text )
1105
1106
else :
1106
1107
table = list ()
1107
- table += [["Hash" , "Votes" , "W/L" , "Approved" , "Is passed" ]]
1108
+ table += [["Hash" , "Config" , " Votes" , "W/L" , "Approved" , "Is passed" ]]
1108
1109
for item in data :
1109
1110
hash = item .get ("hash" )
1110
1111
votedValidators = len (item .get ("votedValidators" ))
@@ -1120,7 +1121,7 @@ def PrintOffersList(ton, args):
1120
1121
isPassed = bcolors .green_text ("true" )
1121
1122
if isPassed == False :
1122
1123
isPassed = bcolors .red_text ("false" )
1123
- table += [[hash , votedValidators , wl , approvedPercent_text , isPassed ]]
1124
+ table += [[hash , item . config . id , votedValidators , wl , approvedPercent_text , isPassed ]]
1124
1125
print_table (table )
1125
1126
#end define
1126
1127
0 commit comments