pub struct TestValidator { /* private fields */ }
Implementations§
Source§impl TestValidator
impl TestValidator
Sourcepub fn with_no_fees(
mint_address: Pubkey,
faucet_addr: Option<SocketAddr>,
socket_addr_space: SocketAddrSpace,
) -> Self
pub fn with_no_fees( mint_address: Pubkey, faucet_addr: Option<SocketAddr>, socket_addr_space: SocketAddrSpace, ) -> Self
Create and start a TestValidator
with no transaction fees and minimal rent.
Faucet optional.
This function panics on initialization failure.
Sourcepub fn with_no_fees_udp(
mint_address: Pubkey,
faucet_addr: Option<SocketAddr>,
socket_addr_space: SocketAddrSpace,
) -> Self
pub fn with_no_fees_udp( mint_address: Pubkey, faucet_addr: Option<SocketAddr>, socket_addr_space: SocketAddrSpace, ) -> Self
Create a test validator using udp for TPU.
Sourcepub fn with_custom_fees(
mint_address: Pubkey,
target_lamports_per_signature: u64,
faucet_addr: Option<SocketAddr>,
socket_addr_space: SocketAddrSpace,
) -> Self
pub fn with_custom_fees( mint_address: Pubkey, target_lamports_per_signature: u64, faucet_addr: Option<SocketAddr>, socket_addr_space: SocketAddrSpace, ) -> Self
Create and start a TestValidator
with custom transaction fees and minimal rent.
Faucet optional.
This function panics on initialization failure.
Sourcepub fn set_startup_verification_complete_for_tests(&self)
pub fn set_startup_verification_complete_for_tests(&self)
allow tests to indicate that validator has completed initialization
Sourcepub fn tpu(&self) -> &SocketAddr
pub fn tpu(&self) -> &SocketAddr
Return the validator’s TPU address
Sourcepub fn gossip(&self) -> &SocketAddr
pub fn gossip(&self) -> &SocketAddr
Return the validator’s Gossip address
Sourcepub fn rpc_pubsub_url(&self) -> String
pub fn rpc_pubsub_url(&self) -> String
Return the validator’s JSON RPC PubSub URL
Sourcepub fn vote_account_address(&self) -> Pubkey
pub fn vote_account_address(&self) -> Pubkey
Return the validator’s vote account address
Sourcepub fn get_rpc_client(&self) -> RpcClient
pub fn get_rpc_client(&self) -> RpcClient
Return an RpcClient for the validator.
Sourcepub fn get_async_rpc_client(&self) -> RpcClient
pub fn get_async_rpc_client(&self) -> RpcClient
Return a nonblocking RpcClient for the validator.
pub fn join(self)
pub fn cluster_info(&self) -> Arc<ClusterInfo>
pub fn bank_forks(&self) -> Arc<RwLock<BankForks>>
pub fn repair_whitelist(&self) -> Arc<RwLock<HashSet<Pubkey>>>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TestValidator
impl !RefUnwindSafe for TestValidator
impl Send for TestValidator
impl Sync for TestValidator
impl Unpin for TestValidator
impl !UnwindSafe for TestValidator
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request