From 182552c2e743d3a273fa03d4e831e2ec167f9108 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 29 Sep 2020 09:53:00 -0700 Subject: [PATCH] Switch get_program_accounts to use base64 --- 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 cfb031afb10520..7fbef479891b6d 100644 --- a/client/src/rpc_client.rs +++ b/client/src/rpc_client.rs @@ -572,8 +572,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) }