Rpc: optionally filter getLargestAccounts by circulating/nonCirculating (#10007)
* Add circ/non-circ filter to getLargestAccounts * Plumb largest accounts into client and cli * Bump timeout toward CI flakiness * Update docs
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::{
|
||||
generic_rpc_client_request::GenericRpcClientRequest,
|
||||
mock_rpc_client_request::{MockRpcClientRequest, Mocks},
|
||||
rpc_client_request::RpcClientRequest,
|
||||
rpc_config::RpcLargestAccountsConfig,
|
||||
rpc_request::{RpcError, RpcRequest},
|
||||
rpc_response::*,
|
||||
};
|
||||
@@ -197,6 +198,13 @@ impl RpcClient {
|
||||
self.send(RpcRequest::GetTotalSupply, json!([commitment_config]), 0)
|
||||
}
|
||||
|
||||
pub fn get_largest_accounts_with_config(
|
||||
&self,
|
||||
config: RpcLargestAccountsConfig,
|
||||
) -> RpcResult<Vec<RpcAccountBalance>> {
|
||||
self.send(RpcRequest::GetLargestAccounts, json!([config]), 0)
|
||||
}
|
||||
|
||||
pub fn get_vote_accounts(&self) -> ClientResult<RpcVoteAccountStatus> {
|
||||
self.get_vote_accounts_with_commitment(CommitmentConfig::default())
|
||||
}
|
||||
|
Reference in New Issue
Block a user