Struct solana_sdk::process_instruction::MockInvokeContext[][src]

pub struct MockInvokeContext {
    pub key: Pubkey,
    pub logger: MockLogger,
    pub bpf_compute_budget: BpfComputeBudget,
    pub compute_meter: MockComputeMeter,
    pub programs: Vec<(Pubkey, ProcessInstructionWithContext)>,
    pub accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>,
    pub invoke_depth: usize,
    pub sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>,
}

Fields

key: Pubkeylogger: MockLoggerbpf_compute_budget: BpfComputeBudgetcompute_meter: MockComputeMeterprograms: Vec<(Pubkey, ProcessInstructionWithContext)>accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>invoke_depth: usizesysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>

Trait Implementations

Returns the “default value” for a type. Read more

Push a program ID on to the invocation stack

Pop a program ID off of the invocation stack

Current depth of the invocation stake

Verify and update PreAccount state based on program execution

Get the program ID of the currently executing program

Get a list of built-in programs

Get this invocation’s logger

Get this invocation’s compute budget

Get this invocation’s compute meter

Loaders may need to do work in order to execute a program. Cache the work that can be re-used across executions Read more

Get the completed loader work that can be re-used across executions

Record invoked instruction

Get the bank’s active feature set

Get an account from a pre-account

Update timing

Get sysvar data

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.