* cache executors on failed transactions (#22308)
(cherry picked from commit 12e160269e
)
# Conflicts:
# program-runtime/src/invoke_context.rs
# programs/bpf_loader/src/lib.rs
# runtime/src/bank.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
@@ -85,6 +85,8 @@ pub trait InvokeContext {
|
||||
/// Loaders may need to do work in order to execute a program. Cache
|
||||
/// the work that can be re-used across executions
|
||||
fn add_executor(&self, pubkey: &Pubkey, executor: Arc<dyn Executor>);
|
||||
/// Cache an executor that has changed
|
||||
fn update_executor(&self, pubkey: &Pubkey, executor: Arc<dyn Executor>);
|
||||
/// Get the completed loader work that can be re-used across executions
|
||||
fn get_executor(&self, pubkey: &Pubkey) -> Option<Arc<dyn Executor>>;
|
||||
/// Record invoked instruction
|
||||
@@ -493,6 +495,7 @@ impl<'a> InvokeContext for MockInvokeContext<'a> {
|
||||
Rc::new(RefCell::new(self.compute_meter.clone()))
|
||||
}
|
||||
fn add_executor(&self, _pubkey: &Pubkey, _executor: Arc<dyn Executor>) {}
|
||||
fn update_executor(&self, _pubkey: &Pubkey, _executor: Arc<dyn Executor>) {}
|
||||
fn get_executor(&self, _pubkey: &Pubkey) -> Option<Arc<dyn Executor>> {
|
||||
None
|
||||
}
|
||||
|
Reference in New Issue
Block a user