diff --git a/Cargo.toml b/Cargo.toml index a1d5480..b477936 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.3.77" +version = "0.3.78" edition = "2021" homepage = "https://git.ghostchain.io/ghostchain" repository = "https://git.ghostchain.io/ghostchain/ghost-eye" diff --git a/src/network/legacy_rpc_calls.rs b/src/network/legacy_rpc_calls.rs index 14ee7d3..b496df8 100644 --- a/src/network/legacy_rpc_calls.rs +++ b/src/network/legacy_rpc_calls.rs @@ -189,9 +189,7 @@ pub async fn get_last_updated( .ok() .map(|hex_string: String| { let bytes = hex::decode(&hex_string[2..]).expect("Invalid hex string"); - u64::decode(&mut bytes.as_slice()) - .ok() - .unwrap_or_default() + u64::decode(&mut bytes.as_slice()).ok().unwrap_or_default() }) .unwrap_or_default(); @@ -219,9 +217,7 @@ pub async fn get_rate_limit_delay( .ok() .map(|hex_string: String| { let bytes = hex::decode(&hex_string[2..]).expect("Invalid hex string"); - u64::decode(&mut bytes.as_slice()) - .ok() - .unwrap_or(5_000u64) + u64::decode(&mut bytes.as_slice()).ok().unwrap_or(5_000u64) }) .unwrap_or(5_000u64); diff --git a/src/network/mod.rs b/src/network/mod.rs index 1fa9184..0ccf294 100644 --- a/src/network/mod.rs +++ b/src/network/mod.rs @@ -277,8 +277,8 @@ impl Network { } TxStatus::InBestBlock(b) => self.action_tx.send(Action::EventLog( format!( - "transaction {} included in the block header {}", - b.extrinsic_hash(), + "transaction {:?} included in the block header {}", + b, b.block_hash() ), ActionLevel::Info, @@ -380,8 +380,12 @@ impl Network { .await?; legacy_rpc_calls::get_last_updated(&self.action_tx, &self.rpc_client, chain_id) .await?; - legacy_rpc_calls::get_rate_limit_delay(&self.action_tx, &self.rpc_client, chain_id) - .await?; + legacy_rpc_calls::get_rate_limit_delay( + &self.action_tx, + &self.rpc_client, + chain_id, + ) + .await?; } Ok(()) } @@ -715,7 +719,7 @@ impl Network { Action::ChillFrom(sender) => { let sender_str = hex::encode(sender); let maybe_nonce = self.senders.get_mut(&sender_str); - if let Ok(tx_progress) = predefined_txs::chill( + if let Ok(_) = predefined_txs::chill( &self.action_tx, &self.online_client_api, &sender, @@ -723,11 +727,11 @@ impl Network { ) .await { - self.transactions_to_watch.push(TxToWatch { - tx_progress, - sender: sender_str, - target: ActionTarget::ValidatorLog, - }); + self.action_tx.send(Action::EventLog( + format!("the chill state will be applied at the start of new era."), + ActionLevel::Info, + ActionTarget::ValidatorLog, + ))? } Ok(()) } @@ -851,12 +855,8 @@ impl Network { .await } Action::NullifyLastTimestamp(chain_id) => { - legacy_rpc_calls::set_last_timestamp( - &self.action_tx, - &self.rpc_client, - chain_id, - ) - .await + legacy_rpc_calls::set_last_timestamp(&self.action_tx, &self.rpc_client, chain_id) + .await } _ => Ok(()), } diff --git a/src/network/raw_rpc.rs b/src/network/raw_rpc.rs index e69de29..8b13789 100644 --- a/src/network/raw_rpc.rs +++ b/src/network/raw_rpc.rs @@ -0,0 +1 @@ +