Struct solana_sdk::process_instruction::MockInvokeContext [−][src]
pub struct MockInvokeContext<'a> { pub invoke_stack: Vec<InvokeContextStackFrame<'a>>, 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 sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>, pub disabled_features: HashSet<Pubkey>, }
Fields
invoke_stack: Vec<InvokeContextStackFrame<'a>>
logger: MockLogger
bpf_compute_budget: BpfComputeBudget
compute_meter: MockComputeMeter
programs: Vec<(Pubkey, ProcessInstructionWithContext)>
accounts: Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>
sysvars: Vec<(Pubkey, Option<Rc<Vec<u8>>>)>
disabled_features: HashSet<Pubkey>
Implementations
Trait Implementations
Push a stack frame onto the invocation stack Read more
Current depth of the invocation stake
fn verify_and_update(
&mut self,
_instruction: &CompiledInstruction,
_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
_write_pivileges: &[bool]
) -> Result<(), InstructionError>
fn verify_and_update(
&mut self,
_instruction: &CompiledInstruction,
_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
_write_pivileges: &[bool]
) -> Result<(), InstructionError>
Verify and update PreAccount state based on program execution
Get the program ID of the currently executing program
Removes the first keyed account
Get the list of keyed accounts
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 by its key
Update timing