diff --git a/Cargo.toml b/Cargo.toml index bd97518..d9f0879 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "ghost-eye" authors = ["str3tch "] description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost" -version = "0.4.2" +version = "0.4.3" edition = "2021" homepage = "https://git.ghostchain.io/ghostchain" repository = "https://git.ghostchain.io/ghostchain/ghost-eye" diff --git a/src/components/validator/rotate_popup.rs b/src/components/validator/rotate_popup.rs index e06de4b..633ced7 100644 --- a/src/components/validator/rotate_popup.rs +++ b/src/components/validator/rotate_popup.rs @@ -70,10 +70,10 @@ impl RotatePopup { let babe_key = format!("0x{}", &self.cached_keys[2..66]); let gran_key = format!("0x{}", &self.cached_keys[66..130]); let audi_key = format!("0x{}", &self.cached_keys[130..194]); - let wevr_key = format!("0x{}", &self.cached_keys[194..258]); + let weav_key = format!("0x{}", &self.cached_keys[194..258]); let exds_key = format!("0x{}", &self.cached_keys[258..322]); - (babe_key, gran_key, audi_key, wevr_key, exds_key) + (babe_key, gran_key, audi_key, weav_key, exds_key) } else { ( String::from("0x0000000000000000000000000000000000000000000000000000000000000000"), @@ -145,7 +145,7 @@ impl Component for RotatePopup { fn draw(&mut self, frame: &mut Frame, area: Rect) -> Result<()> { if self.is_active { let (border_style, border_type) = self.palette.create_popup_style(); - let (babe_key, gran_key, audi_key, wevr_key, exds_key) = self.parse_session_keys(); + let (babe_key, gran_key, audi_key, weav_key, exds_key) = self.parse_session_keys(); let table = Table::new( vec![ @@ -162,8 +162,8 @@ impl Component for RotatePopup { Cell::from(Text::from(audi_key).alignment(Alignment::Right)), ]), Row::new(vec![ - Cell::from(Text::from("wevr".to_string()).alignment(Alignment::Left)), - Cell::from(Text::from(wevr_key).alignment(Alignment::Right)), + Cell::from(Text::from("weav".to_string()).alignment(Alignment::Left)), + Cell::from(Text::from(weav_key).alignment(Alignment::Right)), ]), Row::new(vec![ Cell::from(Text::from("exds".to_string()).alignment(Alignment::Left)), diff --git a/src/components/validator/stash_info.rs b/src/components/validator/stash_info.rs index 6377ff8..be718ad 100644 --- a/src/components/validator/stash_info.rs +++ b/src/components/validator/stash_info.rs @@ -56,7 +56,7 @@ impl StashInfo { stash_address: String::new(), stash_pair: None, session_keys: Default::default(), - key_names: &["gran", "babe", "audi", "wevr", "exds"], + key_names: &["gran", "babe", "audi", "weav", "exds"], stash_filepath: PathBuf::from("/etc/ghost/stash-key"), } } diff --git a/src/network/predefined_calls.rs b/src/network/predefined_calls.rs index a791e73..21e6bf7 100644 --- a/src/network/predefined_calls.rs +++ b/src/network/predefined_calls.rs @@ -238,15 +238,15 @@ pub async fn get_session_keys( account_id: &[u8; 32], ) -> Result<()> { let maybe_session_keys = super::raw_calls::session::next_keys(api, None, account_id).await?; - let (babe_key, gran_key, audi_key, wevr_key, exds_key) = match maybe_session_keys { + let (babe_key, gran_key, audi_key, weav_key, exds_key) = match maybe_session_keys { Some(session_keys) => { let babe_key = format!("0x{}", hex::encode(session_keys.babe.0)); let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0)); let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0)); - let wevr_key = format!("0x{}", hex::encode(session_keys.weaver.0)); + let weav_key = format!("0x{}", hex::encode(session_keys.weaver.0)); let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0)); - (babe_key, gran_key, audi_key, wevr_key, exds_key) + (babe_key, gran_key, audi_key, weav_key, exds_key) } None => (String::new(), String::new(), String::new(), String::new(), String::new()), }; @@ -254,7 +254,7 @@ pub async fn get_session_keys( check_author_has_key(rpc_client, action_tx, &babe_key, "babe").await?; check_author_has_key(rpc_client, action_tx, &gran_key, "gran").await?; check_author_has_key(rpc_client, action_tx, &audi_key, "audi").await?; - check_author_has_key(rpc_client, action_tx, &wevr_key, "wevr").await?; + check_author_has_key(rpc_client, action_tx, &weav_key, "weav").await?; check_author_has_key(rpc_client, action_tx, &exds_key, "exds").await?; Ok(()) @@ -269,17 +269,17 @@ pub async fn get_queued_session_keys( let account = super::raw_calls::convert_array_to_account_id(account_id); let maybe_queued_keys = super::raw_calls::session::queued_keys(api, None).await?; - let (babe_key, gran_key, audi_key, wevr_key, exds_key) = match maybe_queued_keys { + let (babe_key, gran_key, audi_key, weav_key, exds_key) = match maybe_queued_keys { Some(session_keys) => match session_keys.iter().find(|tuple| tuple.0 == account) { Some(keys) => { let session_keys = &keys.1; let babe_key = format!("0x{}", hex::encode(session_keys.babe.0)); let gran_key = format!("0x{}", hex::encode(session_keys.grandpa.0)); let audi_key = format!("0x{}", hex::encode(session_keys.authority_discovery.0)); - let wevr_key = format!("0x{}", hex::encode(session_keys.weaver.0)); + let weav_key = format!("0x{}", hex::encode(session_keys.weaver.0)); let exds_key = format!("0x{}", hex::encode(session_keys.exodus.0)); - (babe_key, gran_key, audi_key, wevr_key, exds_key) + (babe_key, gran_key, audi_key, weav_key, exds_key) } None => (String::new(), String::new(), String::new(), String::new(), String::new()), }, @@ -289,7 +289,7 @@ pub async fn get_queued_session_keys( check_author_has_key(rpc_client, action_tx, &babe_key, "q_babe").await?; check_author_has_key(rpc_client, action_tx, &gran_key, "q_gran").await?; check_author_has_key(rpc_client, action_tx, &audi_key, "q_audi").await?; - check_author_has_key(rpc_client, action_tx, &wevr_key, "q_wevr").await?; + check_author_has_key(rpc_client, action_tx, &weav_key, "q_weav").await?; check_author_has_key(rpc_client, action_tx, &exds_key, "q_exds").await?; Ok(()) diff --git a/src/network/predefined_txs.rs b/src/network/predefined_txs.rs index ab3d560..3498515 100644 --- a/src/network/predefined_txs.rs +++ b/src/network/predefined_txs.rs @@ -115,7 +115,7 @@ pub async fn set_keys( hashed_keys_str: &String, maybe_nonce: Option<&mut u32>, ) -> Result>> { - let (babe_key, gran_key, audi_key, wevr_key, exds_key) = { + let (babe_key, gran_key, audi_key, weav_key, exds_key) = { let s = hashed_keys_str.trim_start_matches("0x"); ( hex::decode(&s[0..64]) @@ -149,7 +149,7 @@ pub async fn set_keys( babe: runtime_types::sp_consensus_babe::app::Public(babe_key), grandpa: runtime_types::sp_consensus_grandpa::app::Public(gran_key), authority_discovery: runtime_types::sp_authority_discovery::app::Public(audi_key), - weaver: runtime_types::ghost_weaver::sr25519::app_sr25519::Public(wevr_key), + weaver: runtime_types::ghost_weaver::sr25519::app_sr25519::Public(weav_key), exodus: runtime_types::ghost_exodus::sr25519::app_sr25519::Public(exds_key), }; // it seems like there is no check for the second paramter, that's why