Add RpcClient::get_transport_stats()

This commit is contained in:
Michael Vines
2021-09-08 18:44:35 -05:00
parent a50576ebe6
commit 21f4606212
4 changed files with 69 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ use {
rpc_config::*,
rpc_request::{RpcError, RpcRequest, RpcResponseErrorData, TokenAccountsFilter},
rpc_response::*,
rpc_sender::RpcSender,
rpc_sender::*,
},
bincode::serialize,
indicatif::{ProgressBar, ProgressStyle},
@@ -3971,6 +3971,10 @@ impl RpcClient {
serde_json::from_value(response)
.map_err(|err| ClientError::new_with_request(err.into(), request))
}
pub fn get_transport_stats(&self) -> RpcTransportStats {
self.sender.get_transport_stats()
}
}
pub fn serialize_and_encode<T>(input: &T, encoding: UiTransactionEncoding) -> ClientResult<String>