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: Pubkey
logger: MockLogger
bpf_compute_budget: BpfComputeBudget
compute_meter: MockComputeMeter
programs: Vec<(Pubkey, ProcessInstructionWithContext)>
accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>
invoke_depth: usize
sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>
Trait Implementations
Push a program ID on to the invocation stack
Current depth of the invocation stake
fn verify_and_update(
&mut self,
_message: &Message,
_instruction: &CompiledInstruction,
_accounts: &[Rc<RefCell<AccountSharedData>>],
_caller_pivileges: Option<&[bool]>
) -> Result<(), InstructionError>
fn verify_and_update(
&mut self,
_message: &Message,
_instruction: &CompiledInstruction,
_accounts: &[Rc<RefCell<AccountSharedData>>],
_caller_pivileges: Option<&[bool]>
) -> Result<(), InstructionError>
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