style: Fix the typos

This commit is contained in:
HowJMay
2021-02-13 15:07:04 +08:00
committed by Trent Nelson
parent a8d4d746ce
commit 9c7b3dc1b5
5 changed files with 8 additions and 8 deletions

View File

@ -283,7 +283,7 @@ fn feature_activation_allowed(rpc_client: &RpcClient, quiet: bool) -> Result<boo
} }
println!( println!(
"{}", "{}",
style(format!("Tool Feture Set: {}", my_feature_set)).bold() style(format!("Tool Feature Set: {}", my_feature_set)).bold()
); );
println!("{}", style("Cluster Feature Sets and Stakes:").bold()); println!("{}", style("Cluster Feature Sets and Stakes:").bold());
for (feature_set, percentage) in active_stake_by_feature_set.iter() { for (feature_set, percentage) in active_stake_by_feature_set.iter() {

View File

@ -286,7 +286,7 @@ fn test_offline_stake_delegation_and_deactivation() {
config_offline.command = CliCommand::ClusterVersion; config_offline.command = CliCommand::ClusterVersion;
let offline_keypair = Keypair::new(); let offline_keypair = Keypair::new();
config_offline.signers = vec![&offline_keypair]; config_offline.signers = vec![&offline_keypair];
// Verfiy that we cannot reach the cluster // Verify that we cannot reach the cluster
process_command(&config_offline).unwrap_err(); process_command(&config_offline).unwrap_err();
request_and_confirm_airdrop( request_and_confirm_airdrop(
@ -535,7 +535,7 @@ fn test_stake_authorize() {
config_offline.json_rpc_url = String::default(); config_offline.json_rpc_url = String::default();
let offline_authority_pubkey = config_offline.signers[0].pubkey(); let offline_authority_pubkey = config_offline.signers[0].pubkey();
config_offline.command = CliCommand::ClusterVersion; config_offline.command = CliCommand::ClusterVersion;
// Verfiy that we cannot reach the cluster // Verify that we cannot reach the cluster
process_command(&config_offline).unwrap_err(); process_command(&config_offline).unwrap_err();
request_and_confirm_airdrop( request_and_confirm_airdrop(
@ -1295,7 +1295,7 @@ fn test_offline_nonced_create_stake_account_and_withdraw() {
let offline_pubkey = config_offline.signers[0].pubkey(); let offline_pubkey = config_offline.signers[0].pubkey();
config_offline.json_rpc_url = String::default(); config_offline.json_rpc_url = String::default();
config_offline.command = CliCommand::ClusterVersion; config_offline.command = CliCommand::ClusterVersion;
// Verfiy that we cannot reach the cluster // Verify that we cannot reach the cluster
process_command(&config_offline).unwrap_err(); process_command(&config_offline).unwrap_err();
request_and_confirm_airdrop( request_and_confirm_airdrop(

View File

@ -85,7 +85,7 @@ impl RpcSender for HttpSender {
} }
} }
}, },
rpc_custom_error::JSON_RPC_SERVER_ERROR_NODE_UNHEALTHLY => { rpc_custom_error::JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY => {
match serde_json::from_value::<rpc_custom_error::NodeUnhealthyErrorData>(json["error"]["data"].clone()) { match serde_json::from_value::<rpc_custom_error::NodeUnhealthyErrorData>(json["error"]["data"].clone()) {
Ok(rpc_custom_error::NodeUnhealthyErrorData {num_slots_behind}) => RpcResponseErrorData::NodeUnhealthy {num_slots_behind}, Ok(rpc_custom_error::NodeUnhealthyErrorData {num_slots_behind}) => RpcResponseErrorData::NodeUnhealthy {num_slots_behind},
Err(_err) => { Err(_err) => {

View File

@ -98,7 +98,7 @@ where
} }
pub fn send_unsubscribe(&self) -> Result<(), PubsubClientError> { pub fn send_unsubscribe(&self) -> Result<(), PubsubClientError> {
let method = format!("{}Unubscribe", self.operation); let method = format!("{}Unsubscribe", self.operation);
self.socket self.socket
.write() .write()
.unwrap() .unwrap()

View File

@ -8,7 +8,7 @@ pub const JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: i64 = -32001;
pub const JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: i64 = -32002; pub const JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: i64 = -32002;
pub const JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: i64 = -32003; pub const JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: i64 = -32003;
pub const JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: i64 = -32004; pub const JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: i64 = -32004;
pub const JSON_RPC_SERVER_ERROR_NODE_UNHEALTHLY: i64 = -32005; pub const JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: i64 = -32005;
pub const JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: i64 = -32006; pub const JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: i64 = -32006;
pub const JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: i64 = -32007; pub const JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: i64 = -32007;
pub const JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: i64 = -32008; pub const JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: i64 = -32008;
@ -80,7 +80,7 @@ impl From<RpcCustomError> for Error {
data: None, data: None,
}, },
RpcCustomError::NodeUnhealthy { num_slots_behind } => Self { RpcCustomError::NodeUnhealthy { num_slots_behind } => Self {
code: ErrorCode::ServerError(JSON_RPC_SERVER_ERROR_NODE_UNHEALTHLY), code: ErrorCode::ServerError(JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY),
message: if let Some(num_slots_behind) = num_slots_behind { message: if let Some(num_slots_behind) = num_slots_behind {
format!("Node is behind by {} slots", num_slots_behind) format!("Node is behind by {} slots", num_slots_behind)
} else { } else {