Add option to wait for a specific epoch length to bench-tps (#10083)

This commit is contained in:
sakridge
2020-05-20 16:42:46 -07:00
committed by GitHub
parent 417f0e41fa
commit ce17de7d25
13 changed files with 256 additions and 128 deletions

View File

@@ -18,6 +18,7 @@ use solana_sdk::{
MAX_HASH_AGE_IN_SECONDS,
},
commitment_config::CommitmentConfig,
epoch_info::EpochInfo,
epoch_schedule::EpochSchedule,
fee_calculator::{FeeCalculator, FeeRateGovernor},
hash::Hash,
@@ -309,14 +310,14 @@ impl RpcClient {
.map_err(|err| err.into_with_request(request))?
}
pub fn get_epoch_info(&self) -> ClientResult<RpcEpochInfo> {
pub fn get_epoch_info(&self) -> ClientResult<EpochInfo> {
self.get_epoch_info_with_commitment(CommitmentConfig::default())
}
pub fn get_epoch_info_with_commitment(
&self,
commitment_config: CommitmentConfig,
) -> ClientResult<RpcEpochInfo> {
) -> ClientResult<EpochInfo> {
self.send(RpcRequest::GetEpochInfo, json!([commitment_config]), 0)
}