Skip to content

Commit d4d1b46

Browse files
committed
add stake to vl
1 parent 683329d commit d4d1b46

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/utilities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,14 @@ def print_validator_list(self, args):
313313
print(text)
314314
else:
315315
table = list()
316-
table += [["id", "ADNL", "Pubkey", "Wallet", "Efficiency", "Online"]]
316+
table += [["id", "ADNL", "Pubkey", "Wallet", "Stake", "Efficiency", "Online"]]
317317
for i, item in enumerate(data):
318318
adnl = item.get("adnlAddr")
319319
pubkey = item.get("pubkey")
320320
walletAddr = item.get("walletAddr")
321321
efficiency = item.get("efficiency")
322322
online = item.get("online")
323+
stake = item.get("stake")
323324
if "adnl" not in args:
324325
adnl = self.reduct(adnl)
325326
if "pubkey" not in args:
@@ -332,7 +333,7 @@ def print_validator_list(self, args):
332333
online = bcolors.green_text("true")
333334
if not online:
334335
online = bcolors.red_text("false")
335-
table += [[str(i), adnl, pubkey, walletAddr, efficiency, online]]
336+
table += [[str(i), adnl, pubkey, walletAddr, stake, efficiency, online]]
336337
print_table(table)
337338
# end define
338339

mytoncore/mytoncore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,6 +2490,7 @@ def GetValidatorsList(self, past=False, fast=False, start=None, end=None):
24902490
validator["efficiency"] = round(validator["wr"] * 100, 2)
24912491
if saveElectionEntries and adnlAddr in saveElectionEntries:
24922492
validator["walletAddr"] = saveElectionEntries[adnlAddr]["walletAddr"]
2493+
validator["stake"] = saveElectionEntries[adnlAddr].get("stake")
24932494
#end for
24942495

24952496
# Set buffer

0 commit comments

Comments
 (0)