* Add rpc_client api for getRecentPerformanceSamples
* Prep fn for variable avg slot time
* Use recent-perf-samples to more-accurately estimate epoch completed times
* Spell out average
(cherry picked from commit 3726358f51
)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
This commit is contained in:
@@ -644,6 +644,13 @@ impl RpcClient {
|
||||
self.send(RpcRequest::GetEpochSchedule, Value::Null)
|
||||
}
|
||||
|
||||
pub fn get_recent_performance_samples(
|
||||
&self,
|
||||
limit: Option<usize>,
|
||||
) -> ClientResult<Vec<RpcPerfSample>> {
|
||||
self.send(RpcRequest::GetRecentPerformanceSamples, json!([limit]))
|
||||
}
|
||||
|
||||
pub fn get_identity(&self) -> ClientResult<Pubkey> {
|
||||
let rpc_identity: RpcIdentity = self.send(RpcRequest::GetIdentity, Value::Null)?;
|
||||
|
||||
|
Reference in New Issue
Block a user