From 96c6a1a898e265b0dab6b9daecfaaa5518ec65f7 Mon Sep 17 00:00:00 2001 From: peg Date: Tue, 17 Dec 2024 11:13:02 +0100 Subject: [PATCH] Comments --- .../threshold-signature-server/src/helpers/launch.rs | 10 ++++++++++ crates/threshold-signature-server/src/helpers/tests.rs | 2 ++ 2 files changed, 12 insertions(+) diff --git a/crates/threshold-signature-server/src/helpers/launch.rs b/crates/threshold-signature-server/src/helpers/launch.rs index 5a66e0858..3c7085888 100644 --- a/crates/threshold-signature-server/src/helpers/launch.rs +++ b/crates/threshold-signature-server/src/helpers/launch.rs @@ -311,6 +311,16 @@ pub async fn check_node_prerequisites(url: &str, account_id: &str) { tracing::warn!("Unable to query the account balance of `{}`", &account_id) }, } + + // TODO now check if there exists a threshold server with our details - if there is not, + // we need to wait until there is + // let stash_address_query = entropy::storage() + // .staking_extension() + // .threshold_to_stash(validator_info.tss_account.clone()); + // + // let stash_address = query_chain(&api, &rpc, stash_address_query, None) + // .await? + // .ok_or_else(|| UserErr::ChainFetch("Stash Fetch Error"))?; }, Err(_err) => { tracing::error!("Unable to establish connection with Substrate node at `{}`", url); diff --git a/crates/threshold-signature-server/src/helpers/tests.rs b/crates/threshold-signature-server/src/helpers/tests.rs index 479a7109c..c618f682b 100644 --- a/crates/threshold-signature-server/src/helpers/tests.rs +++ b/crates/threshold-signature-server/src/helpers/tests.rs @@ -72,6 +72,7 @@ pub async fn setup_client() -> KvManager { let _ = setup_latest_block_number(&kv_store).await; let configuration = Configuration::new(DEFAULT_ENDPOINT.to_string()); let app_state = AppState::new(configuration, kv_store.clone(), &Some(ValidatorName::Alice)); + // Mock making the pre-requisite checks by setting the application state to ready app_state.make_ready(); let app = app(app_state).into_make_service(); @@ -108,6 +109,7 @@ pub async fn create_clients( } let app_state = AppState::new(configuration, kv_store.clone(), validator_name); + // Mock making the pre-requisite checks by setting the application state to ready app_state.make_ready(); let account_id = app_state.subxt_account_id();