From 27948563f5c860eb0ae9deb457586f1249c3b5ea Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Sep 2020 20:33:59 +0000 Subject: [PATCH] Switch get_program_accounts to use base64 (#12558) (cherry picked from commit 182552c2e743d3a273fa03d4e831e2ec167f9108) Co-authored-by: Michael Vines --- client/src/rpc_client.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/rpc_client.rs b/client/src/rpc_client.rs index c049aca996..045106a888 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -577,8 +577,16 @@ impl RpcClient { } pub fn get_program_accounts(&self, pubkey: &Pubkey) -> ClientResult> { - let accounts: Vec = - self.send(RpcRequest::GetProgramAccounts, json!([pubkey.to_string()]))?; + let config = RpcAccountInfoConfig { + encoding: Some(UiAccountEncoding::Base64), + commitment: None, + data_slice: None, + }; + + let accounts: Vec = self.send( + RpcRequest::GetProgramAccounts, + json!([pubkey.to_string(), config]), + )?; parse_keyed_accounts(accounts, RpcRequest::GetProgramAccounts) }