Skip to content

Commit

Permalink
Get account with commitment for nonce in bench-tps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Lykov committed Aug 26, 2022
1 parent b129eee commit b0138f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bench-tps/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use {
solana_metrics::{self, datapoint_info},
solana_sdk::{
clock::{DEFAULT_MS_PER_SLOT, DEFAULT_S_PER_SLOT, MAX_PROCESSING_AGE},
commitment_config::CommitmentConfig,
compute_budget::ComputeBudgetInstruction,
hash::Hash,
instruction::{AccountMeta, Instruction},
Expand Down Expand Up @@ -544,7 +545,9 @@ fn get_nonce_blockhash<T: 'static + BenchTpsClient + Send + Sync + ?Sized>(
nonce_account_pubkey: Pubkey,
) -> Hash {
loop {
match client.get_account(&nonce_account_pubkey) {
match client
.get_account_with_commitment(&nonce_account_pubkey, CommitmentConfig::processed())
{
Ok(nonce_account) => match nonce_utils::data_from_account(&nonce_account) {
Ok(nonce_data) => return nonce_data.blockhash(),
Err(err) => {
Expand Down

0 comments on commit b0138f9

Please sign in to comment.