@ -285,7 +285,7 @@ impl StakeSubCommands for App<'_, '_> {
|
||||
.arg(withdraw_authority_arg())
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("show-stake-account")
|
||||
SubCommand::with_name("stake-account")
|
||||
.about("Show the contents of a stake account")
|
||||
.alias("show-stake-account")
|
||||
.arg(
|
||||
|
@ -177,7 +177,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetVoteAccounts parse failure: {}", err),
|
||||
format!("GetVoteAccounts parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -196,7 +196,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetClusterNodes parse failure: {}", err),
|
||||
format!("GetClusterNodes parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -215,7 +215,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetConfirmedBlock parse failure: {}", err),
|
||||
format!("GetConfirmedBlock parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -242,7 +242,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetConfirmedBlocks parse failure: {}", err),
|
||||
format!("GetConfirmedBlocks parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -293,7 +293,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetEpochInfo parse failure: {}", err),
|
||||
format!("GetEpochInfo parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -324,7 +324,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetLeaderSchedule failure: {}", err),
|
||||
format!("GetLeaderSchedule failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -343,7 +343,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetEpochSchedule parse failure: {}", err),
|
||||
format!("GetEpochSchedule parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -381,7 +381,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetVersion parse failure: {}", err),
|
||||
format!("GetVersion parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -400,7 +400,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("MinimumLedgerSlot parse failure: {}", err),
|
||||
format!("MinimumLedgerSlot parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
@ -612,7 +612,7 @@ impl RpcClient {
|
||||
.map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("AccountNotFound: pubkey={}: {}", pubkey, err),
|
||||
format!("AccountNotFound: pubkey={}: {:?}", pubkey, err),
|
||||
)
|
||||
})?
|
||||
}
|
||||
@ -698,7 +698,7 @@ impl RpcClient {
|
||||
.map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("AccountNotFound: pubkey={}: {}", pubkey, err),
|
||||
format!("AccountNotFound: pubkey={}: {:?}", pubkey, err),
|
||||
)
|
||||
})?;
|
||||
|
||||
@ -749,7 +749,7 @@ impl RpcClient {
|
||||
serde_json::from_value(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetTransactionCount parse failure: {}", err),
|
||||
format!("GetTransactionCount parse failure: {:?}", err),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
@ -15,10 +15,7 @@ pub struct RpcClientRequest {
|
||||
|
||||
impl RpcClientRequest {
|
||||
pub fn new(url: String) -> Self {
|
||||
Self {
|
||||
client: reqwest::blocking::Client::new(),
|
||||
url,
|
||||
}
|
||||
Self::new_with_timeout(url, Duration::from_secs(20))
|
||||
}
|
||||
|
||||
pub fn new_with_timeout(url: String, timeout: Duration) -> Self {
|
||||
|
Reference in New Issue
Block a user