Document get_account() gotcha (#13713)

(cherry picked from commit f9acbd6e3f)

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-11-19 23:21:43 +00:00
committed by GitHub
parent 5e1497856b
commit 841f596b26

View File

@ -610,6 +610,8 @@ impl RpcClient {
} }
} }
/// Note that `get_account` returns `Err(..)` if the account does not exist whereas
/// `get_account_with_commitment` returns `Ok(None)` if the account does not exist.
pub fn get_account(&self, pubkey: &Pubkey) -> ClientResult<Account> { pub fn get_account(&self, pubkey: &Pubkey) -> ClientResult<Account> {
self.get_account_with_commitment(pubkey, self.commitment_config)? self.get_account_with_commitment(pubkey, self.commitment_config)?
.value .value