From 841f596b26b316d2a2393b9e36e16252b3271992 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Nov 2020 23:21:43 +0000 Subject: [PATCH] Document get_account() gotcha (#13713) (cherry picked from commit f9acbd6e3f7fd8bb242dfb274a3505b66eeb52c0) Co-authored-by: Michael Vines --- client/src/rpc_client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index 6688edf8e9..10091ec65e 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -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 { self.get_account_with_commitment(pubkey, self.commitment_config)? .value