From 0a8215546cb150d4bdd32bff6beaefee4fce306d Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Fri, 30 Jun 2023 19:04:59 +0200 Subject: [PATCH] add also smith member count to reveal bug --- src/commands/smith.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/commands/smith.rs b/src/commands/smith.rs index 3e1134b..865a9ed 100644 --- a/src/commands/smith.rs +++ b/src/commands/smith.rs @@ -38,6 +38,8 @@ pub enum Subcommand { }, /// List online authorities ShowOnline, + /// count of smith member + MemberCount, } /// handle smith commands @@ -78,6 +80,18 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( data = data.build_client().await?; online(&data).await? } + Subcommand::MemberCount => { + println!( + "smith member count: {:?}", + data.client() + .storage() + .fetch( + &runtime::storage().smith_membership().counter_for_membership(), + None, + ) + .await? + ) + } }; Ok(()) -- GitLab