From 82d32da3cc211027babb76dac364752f9d941440 Mon Sep 17 00:00:00 2001 From: oldcryptogeek Date: Wed, 13 Nov 2019 15:32:17 -0700 Subject: [PATCH] Menu Change --- __main__.py | 62 ++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/__main__.py b/__main__.py index 46fd402..4221357 100644 --- a/__main__.py +++ b/__main__.py @@ -15,9 +15,9 @@ (7) Display Current Address (8) Check Balance (9) Show All Accounts (10) Show Message Log (11) Show Node stats (12) Show Established Peers -(13) Show Blockchain Size (14) Show Leader Logs (15) Show Settings -(16) Aggregate Blocks Produced (17) Stake Distribution (18) Genesis Decode -(19) Fork Check +(13) Show Stake Pools (14) Show Stake (15) Show Blockchain Size +(16) Show Leader Logs (17) Show Settings (18) Aggregate Blocks Produced +(19) Stake Distribution (20) Genesis Decode (21) Fork Check (v) Show Versions (i) View User Info (f) View Config File (e) Export All Accounts (c) Clear Screen (q) Quit @@ -208,32 +208,32 @@ def run(self): self.clear() pprint.pprint(casper.node.show_peers()) -# if choice == '13': # Show Stake Pools. -# self.clear() -# pools = casper.node.show_stake_pools() - -# pprint.pprint(pools) -# print("\n\n") -# self.typed_text(f'Number of registered pools: {str(len(pools))}', 0.004) - -# if choice == '14': # Show Stake. -# self.clear() -# stake = casper.node.show_stake()["stake"]["pools"] -# table = tabulate( -# stake, -# headers=[ -# "Hex-encoded stake pool ID", -# "Total pool value" -# ], -# tablefmt="psql" -# ) -# print(table) - - if choice == '13': # Show Chain Size. + if choice == '13': # Show Stake Pools. + self.clear() + pools = casper.node.show_stake_pools() + + pprint.pprint(pools) + print("\n\n") + self.typed_text(f'Number of registered pools: {str(len(pools))}', 0.004) + + if choice == '14': # Show Stake. + self.clear() + stake = casper.node.show_stake()["stake"]["pools"] + table = tabulate( + stake, + headers=[ + "Hex-encoded stake pool ID", + "Total pool value" + ], + tablefmt="psql" + ) + print(table) + + if choice == '15': # Show Chain Size. self.clear() pprint.pprint(casper.cli.show_blockchain_size()) - if choice == '14': # Show Leaders Logs. + if choice == '16': # Show Leaders Logs. self.clear() # pprint.pprint(casper.node.show_leader_logs()) leaderlogs = casper.node.show_leader_logs() @@ -245,23 +245,23 @@ def run(self): else: print("Leader logs are empty") - if choice == '15': # Show Chain Settings. + if choice == '17': # Show Chain Settings. self.clear() pprint.pprint(casper.node.show_settings()) - if choice == "16": # janalyze.py aggreate blocks + if choice == "18": # janalyze.py aggreate blocks self.clear() analyze.aggregate() - if choice == "17": # janalyze.py distribution + if choice == "19": # janalyze.py distribution self.clear() analyze.distribution() - if choice == '18': # Genesis Decode. + if choice == '20': # Genesis Decode. self.clear() print(casper.cli.genesis_decode()) - if choice == '19': # Fork Check + if choice == '21': # Fork Check self.clear() analyze.forkcheck()