Add get_max_retransmit_slot/get_max_shred_insert_slot to RpcClient (#16243)
(cherry picked from commit 2a1639836a
)
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@ -869,6 +869,14 @@ impl RpcClient {
|
|||||||
})?
|
})?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_max_retransmit_slot(&self) -> ClientResult<Slot> {
|
||||||
|
self.send(RpcRequest::GetMaxRetransmitSlot, Value::Null)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_max_shred_insert_slot(&self) -> ClientResult<Slot> {
|
||||||
|
self.send(RpcRequest::GetMaxShredInsertSlot, Value::Null)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_multiple_accounts(&self, pubkeys: &[Pubkey]) -> ClientResult<Vec<Option<Account>>> {
|
pub fn get_multiple_accounts(&self, pubkeys: &[Pubkey]) -> ClientResult<Vec<Option<Account>>> {
|
||||||
Ok(self
|
Ok(self
|
||||||
.get_multiple_accounts_with_commitment(pubkeys, self.commitment_config)?
|
.get_multiple_accounts_with_commitment(pubkeys, self.commitment_config)?
|
||||||
|
@ -32,6 +32,8 @@ pub enum RpcRequest {
|
|||||||
GetInflationRate,
|
GetInflationRate,
|
||||||
GetLargestAccounts,
|
GetLargestAccounts,
|
||||||
GetLeaderSchedule,
|
GetLeaderSchedule,
|
||||||
|
GetMaxRetransmitSlot,
|
||||||
|
GetMaxShredInsertSlot,
|
||||||
GetMinimumBalanceForRentExemption,
|
GetMinimumBalanceForRentExemption,
|
||||||
GetMultipleAccounts,
|
GetMultipleAccounts,
|
||||||
GetProgramAccounts,
|
GetProgramAccounts,
|
||||||
@ -91,6 +93,8 @@ impl fmt::Display for RpcRequest {
|
|||||||
RpcRequest::GetInflationRate => "getInflationRate",
|
RpcRequest::GetInflationRate => "getInflationRate",
|
||||||
RpcRequest::GetLargestAccounts => "getLargestAccounts",
|
RpcRequest::GetLargestAccounts => "getLargestAccounts",
|
||||||
RpcRequest::GetLeaderSchedule => "getLeaderSchedule",
|
RpcRequest::GetLeaderSchedule => "getLeaderSchedule",
|
||||||
|
RpcRequest::GetMaxRetransmitSlot => "getMaxRetransmitSlot",
|
||||||
|
RpcRequest::GetMaxShredInsertSlot => "getMaxShredInsertSlot",
|
||||||
RpcRequest::GetMinimumBalanceForRentExemption => "getMinimumBalanceForRentExemption",
|
RpcRequest::GetMinimumBalanceForRentExemption => "getMinimumBalanceForRentExemption",
|
||||||
RpcRequest::GetMultipleAccounts => "getMultipleAccounts",
|
RpcRequest::GetMultipleAccounts => "getMultipleAccounts",
|
||||||
RpcRequest::GetProgramAccounts => "getProgramAccounts",
|
RpcRequest::GetProgramAccounts => "getProgramAccounts",
|
||||||
|
Reference in New Issue
Block a user