Struct solana_test_validator::TestValidatorGenesis [−][src]
pub struct TestValidatorGenesis {
pub rent: Rent,
pub validator_exit: Arc<RwLock<Exit>>,
pub start_progress: Arc<RwLock<ValidatorStartProgress>>,
pub authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,
pub max_ledger_shreds: Option<u64>,
pub max_genesis_archive_unpacked_size: Option<u64>,
pub accountsdb_plugin_config_files: Option<Vec<PathBuf>>,
pub accounts_db_caching_enabled: bool,
// some fields omitted
}Fields
rent: Rentvalidator_exit: Arc<RwLock<Exit>>start_progress: Arc<RwLock<ValidatorStartProgress>>max_ledger_shreds: Option<u64>max_genesis_archive_unpacked_size: Option<u64>accountsdb_plugin_config_files: Option<Vec<PathBuf>>accounts_db_caching_enabled: boolImplementations
Check if a given TestValidator ledger has already been initialized
Add an account to the test environment
pub fn add_accounts<T>(&mut self, accounts: T) -> &mut Self where
T: IntoIterator<Item = (Pubkey, AccountSharedData)>,
pub fn clone_accounts<T>(
&mut self,
addresses: T,
rpc_client: &RpcClient
) -> &mut Self where
T: IntoIterator<Item = Pubkey>,
pub fn add_account_with_file_data(
&mut self,
address: Pubkey,
lamports: u64,
owner: Pubkey,
filename: &str
) -> &mut Self
pub fn add_account_with_file_data(
&mut self,
address: Pubkey,
lamports: u64,
owner: Pubkey,
filename: &str
) -> &mut Self
Add an account to the test environment with the account data in the provided filename
pub fn add_account_with_base64_data(
&mut self,
address: Pubkey,
lamports: u64,
owner: Pubkey,
data_base64: &str
) -> &mut Self
pub fn add_account_with_base64_data(
&mut self,
address: Pubkey,
lamports: u64,
owner: Pubkey,
data_base64: &str
) -> &mut Self
Add an account to the test environment with the account data in the provided as a base 64 string
Add a BPF program to the test environment.
program_name will also used to locate the BPF shared object in the current or fixtures
directory.
Add a list of programs to the test environment. pub fn add_programs_with_path<’a>(&’a mut self, programs: &ProgramInfo) -> &’a mut Self {
pub fn start_with_mint_address(
&self,
mint_address: Pubkey,
socket_addr_space: SocketAddrSpace
) -> Result<TestValidator, Box<dyn Error>>
pub fn start_with_mint_address(
&self,
mint_address: Pubkey,
socket_addr_space: SocketAddrSpace
) -> Result<TestValidator, Box<dyn Error>>
Start a test validator with the address of the mint account that will receive tokens created at genesis.
Start a test validator
Returns a new TestValidator as well as the keypair for the mint account that will receive tokens
created at genesis.
This function panics on initialization failure.
pub fn start_with_socket_addr_space(
&self,
socket_addr_space: SocketAddrSpace
) -> (TestValidator, Keypair)
pub fn start_with_socket_addr_space(
&self,
socket_addr_space: SocketAddrSpace
) -> (TestValidator, Keypair)
Start a test validator with the given SocketAddrSpace
Returns a new TestValidator as well as the keypair for the mint account that will receive tokens
created at genesis.
This function panics on initialization failure.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TestValidatorGenesis
impl Send for TestValidatorGenesis
impl Sync for TestValidatorGenesis
impl Unpin for TestValidatorGenesis
impl !UnwindSafe for TestValidatorGenesis
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Wrap the input message T in a tonic::Request
impl<T> TupleTree<T, ()> for T
impl<T> TupleTree<T, ()> for T
pub const SIZE: Size
pub fn descendants(_indirect_level: usize) -> usize
pub fn preorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))
pub fn postorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
