Skip to content

Commit

Permalink
get_program_accounts_with_config() now correctly defaults to RpcClien…
Browse files Browse the repository at this point in the history
…t's commitment level
  • Loading branch information
mvines authored and mergify[bot] committed May 18, 2021
1 parent cfcae50 commit 63b9772
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,6 @@ impl RpcClient {
filters: None,
account_config: RpcAccountInfoConfig {
encoding: Some(UiAccountEncoding::Base64Zstd),
commitment: Some(self.commitment_config),
..RpcAccountInfoConfig::default()
},
},
Expand All @@ -1178,7 +1177,10 @@ impl RpcClient {
pubkey: &Pubkey,
config: RpcProgramAccountsConfig,
) -> ClientResult<Vec<(Pubkey, Account)>> {
let commitment = config.account_config.commitment.unwrap_or_default();
let commitment = config
.account_config
.commitment
.unwrap_or_else(|| self.commitment());
let commitment = self.maybe_map_commitment(commitment)?;
let account_config = RpcAccountInfoConfig {
commitment: Some(commitment),
Expand Down

0 comments on commit 63b9772

Please sign in to comment.