Struct solana_program_test::ProgramTestContext [−][src]
pub struct ProgramTestContext {
pub banks_client: BanksClient,
pub last_blockhash: Hash,
pub payer: Keypair,
// some fields omitted
}
Fields
banks_client: BanksClient
last_blockhash: Hash
payer: Keypair
Implementations
pub fn increment_vote_account_credits(
&mut self,
vote_account_address: &Pubkey,
number_of_credits: u64
)
pub fn increment_vote_account_credits(
&mut self,
vote_account_address: &Pubkey,
number_of_credits: u64
)
Manually increment vote credits for the current epoch in the specified vote account to simulate validator voting activity
Create or overwrite an account, subverting normal runtime checks.
This method exists to make it easier to set up artificial situations that would be difficult to replicate by sending individual transactions. Beware that it can be used to create states that would not be reachable by sending transactions!
Force the working bank ahead to a new slot
Auto Trait Implementations
impl !RefUnwindSafe for ProgramTestContext
impl Send for ProgramTestContext
impl Sync for ProgramTestContext
impl Unpin for ProgramTestContext
impl !UnwindSafe for ProgramTestContext
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>
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