From d1713424be058e74e2ea2b387d8d0b8f948f600c Mon Sep 17 00:00:00 2001 From: Ala Shaabana Date: Mon, 16 Oct 2023 12:34:01 -0400 Subject: [PATCH] Added mechanism to sum all delegated tao --- bittensor/commands/delegates.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bittensor/commands/delegates.py b/bittensor/commands/delegates.py index b622abf6fb..474d4d6fd6 100644 --- a/bittensor/commands/delegates.py +++ b/bittensor/commands/delegates.py @@ -526,6 +526,7 @@ def run(cli): table.add_column("[overline white]VPERMIT", justify="right", no_wrap=True) table.add_column("[overline white]24h/k\u03C4", style="green", justify="center") table.add_column("[overline white]Desc", style="rgb(50,163,219)") + total_delegated = 0 for wallet in tqdm(wallets): if not wallet.coldkeypub_file.exists_on_device(): @@ -544,6 +545,7 @@ def run(cli): my_delegates[delegate[0].hotkey_ss58] = staked delegates.sort(key=lambda delegate: delegate[0].total_stake, reverse=True) + total_delegated += sum(my_delegates.values()) registered_delegate_info: Optional[ DelegatesDetails @@ -602,6 +604,7 @@ def run(cli): ) bittensor.__console__.print(table) + bittensor.__console__.print("Total delegated Tao: {}".format(total_delegated)) @staticmethod def add_args(parser: argparse.ArgumentParser):