Prevent scans on unrooted slots from seeing partial clean (#13628) (#13741)

Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 791fb17437)

Co-authored-by: carllin <wumu727@gmail.com>
This commit is contained in:
mergify[bot]
2020-11-20 22:14:51 +00:00
committed by GitHub
parent 3743e44fb3
commit d0cac2a2ea
7 changed files with 500 additions and 62 deletions

View File

@@ -3,7 +3,7 @@
//! messages to the network directly. The binary encoding of its messages are
//! unstable and may change in future releases.
use crate::{rpc_client::RpcClient, rpc_response::Response};
use crate::{rpc_client::RpcClient, rpc_config::RpcProgramAccountsConfig, rpc_response::Response};
use bincode::{serialize_into, serialized_size};
use log::*;
use solana_sdk::{
@@ -276,6 +276,16 @@ impl ThinClient {
)
}
pub fn get_program_accounts_with_config(
&self,
pubkey: &Pubkey,
config: RpcProgramAccountsConfig,
) -> TransportResult<Vec<(Pubkey, Account)>> {
self.rpc_client()
.get_program_accounts_with_config(pubkey, config)
.map_err(|e| e.into())
}
pub fn wait_for_balance_with_commitment(
&self,
pubkey: &Pubkey,