Document get_account() gotcha

This commit is contained in:
Michael Vines 2020-11-19 09:12:03 -08:00
parent af08ba93e6
commit f9acbd6e3f
1 changed files with 2 additions and 0 deletions

View File

@ -642,6 +642,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> {
self.get_account_with_commitment(pubkey, self.commitment_config)?
.value