Struct solana_sdk::process_instruction::MockInvokeContext
source · [−]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 sysvar_cache: Cow<'a, SysvarCache>,
pub disabled_features: HashSet<Pubkey>,
pub return_data: Option<(Pubkey, Vec<u8>)>,
pub execute_timings: ExecuteDetailsTimings,
}
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>>)>
sysvar_cache: Cow<'a, SysvarCache>
disabled_features: HashSet<Pubkey>
return_data: Option<(Pubkey, Vec<u8>)>
execute_timings: ExecuteDetailsTimings
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
Cache an executor that has changed
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
Get sysvar cache
Get timings