Struct solana_runtime::message_processor::MessageProcessor [−][src]
pub struct MessageProcessor { /* fields omitted */ }
Implementations
pub fn add_program(
&mut self,
program_id: Pubkey,
process_instruction: ProcessInstructionWithContext
)
pub fn add_program(
&mut self,
program_id: Pubkey,
process_instruction: ProcessInstructionWithContext
)
Add a static entrypoint to intercept instructions before the dynamic loader.
pub fn add_loader(
&mut self,
program_id: Pubkey,
process_instruction: ProcessInstructionWithContext
)
pub fn create_message(
instruction: &Instruction,
keyed_accounts: &[&KeyedAccount<'_>],
signers: &[Pubkey],
invoke_context: &Ref<'_, &mut dyn InvokeContext>
) -> Result<(Message, Pubkey, usize), InstructionError>
pub fn native_invoke(
invoke_context: &mut dyn InvokeContext,
instruction: Instruction,
keyed_accounts: &[&KeyedAccount<'_>],
signers_seeds: &[&[&[u8]]]
) -> Result<(), InstructionError>
pub fn native_invoke(
invoke_context: &mut dyn InvokeContext,
instruction: Instruction,
keyed_accounts: &[&KeyedAccount<'_>],
signers_seeds: &[&[&[u8]]]
) -> Result<(), InstructionError>
Entrypoint for a cross-program invocation from a native program
pub fn process_cross_program_instruction(
message: &Message,
executable_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
accounts: &[Rc<RefCell<AccountSharedData>>],
caller_write_privileges: &[bool],
invoke_context: &mut dyn InvokeContext
) -> Result<(), InstructionError>
pub fn process_cross_program_instruction(
message: &Message,
executable_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
accounts: &[Rc<RefCell<AccountSharedData>>],
caller_write_privileges: &[bool],
invoke_context: &mut dyn InvokeContext
) -> Result<(), InstructionError>
Process a cross-program instruction This method calls the instruction’s program entrypoint function
pub fn create_pre_accounts(
message: &Message,
instruction: &CompiledInstruction,
accounts: &[Rc<RefCell<AccountSharedData>>]
) -> Vec<PreAccount>
pub fn create_pre_accounts(
message: &Message,
instruction: &CompiledInstruction,
accounts: &[Rc<RefCell<AccountSharedData>>]
) -> Vec<PreAccount>
Record the initial state of the accounts so that they can be compared after the instruction is processed
Verify there are no outstanding borrows
pub fn verify(
message: &Message,
instruction: &CompiledInstruction,
pre_accounts: &[PreAccount],
executable_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
accounts: &[Rc<RefCell<AccountSharedData>>],
rent: &Rent,
timings: &mut ExecuteDetailsTimings,
updated_verify_policy: bool,
demote_program_write_locks: bool
) -> Result<(), InstructionError>
pub fn verify(
message: &Message,
instruction: &CompiledInstruction,
pre_accounts: &[PreAccount],
executable_accounts: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
accounts: &[Rc<RefCell<AccountSharedData>>],
rent: &Rent,
timings: &mut ExecuteDetailsTimings,
updated_verify_policy: bool,
demote_program_write_locks: bool
) -> Result<(), InstructionError>
Verify the results of an instruction
pub fn process_message(
&self,
message: &Message,
loaders: &[Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>],
accounts: &[Rc<RefCell<AccountSharedData>>],
account_deps: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
rent_collector: &RentCollector,
log_collector: Option<Rc<LogCollector>>,
executors: Rc<RefCell<Executors>>,
instruction_recorders: Option<&[InstructionRecorder]>,
feature_set: Arc<FeatureSet>,
bpf_compute_budget: BpfComputeBudget,
timings: &mut ExecuteDetailsTimings,
account_db: Arc<Accounts>,
ancestors: &Ancestors
) -> Result<(), TransactionError>
pub fn process_message(
&self,
message: &Message,
loaders: &[Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>],
accounts: &[Rc<RefCell<AccountSharedData>>],
account_deps: &[(Pubkey, Rc<RefCell<AccountSharedData>>)],
rent_collector: &RentCollector,
log_collector: Option<Rc<LogCollector>>,
executors: Rc<RefCell<Executors>>,
instruction_recorders: Option<&[InstructionRecorder]>,
feature_set: Arc<FeatureSet>,
bpf_compute_budget: BpfComputeBudget,
timings: &mut ExecuteDetailsTimings,
account_db: Arc<Accounts>,
ancestors: &Ancestors
) -> Result<(), TransactionError>
Process a message. This method calls each instruction in the message over the set of loaded Accounts The accounts are committed back to the bank only if every instruction succeeds
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for MessageProcessor
impl Send for MessageProcessor
impl Sync for MessageProcessor
impl Unpin for MessageProcessor
impl UnwindSafe for MessageProcessor
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
Mutably borrows from an owned value. Read more
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