pub struct TransactionExecutorCache {
pub visible: HashMap<Pubkey, Arc<LoadedProgram>>,
pub deployments: HashMap<Pubkey, Arc<LoadedProgram>>,
pub add_to_cache: HashMap<Pubkey, Arc<LoadedProgram>>,
}
Expand description
A subset of the BankExecutorCache containing only the executors relevant to one transaction
The BankExecutorCache can not be updated directly as transaction batches are processed in parallel, which would cause a race condition.
Fields§
§visible: HashMap<Pubkey, Arc<LoadedProgram>>
Executors or tombstones which are visible during the transaction
deployments: HashMap<Pubkey, Arc<LoadedProgram>>
Executors of programs which were re-/deploymed during the transaction
add_to_cache: HashMap<Pubkey, Arc<LoadedProgram>>
Executors which were missing in the cache and not re-/deploymed during the transaction
Implementations§
source§impl TransactionExecutorCache
impl TransactionExecutorCache
pub fn new( executable_keys: impl Iterator<Item = (Pubkey, Arc<LoadedProgram>)> ) -> Self
pub fn get(&self, key: &Pubkey) -> Option<Arc<LoadedProgram>>
pub fn set_tombstone(&mut self, key: Pubkey, slot: Slot)
pub fn set( &mut self, key: Pubkey, executor: Arc<LoadedProgram>, upgrade: bool, delay_visibility_of_program_deployment: bool, current_slot: Slot )
pub fn get_executors_added_to_the_cache( &mut self ) -> HashMap<Pubkey, Arc<LoadedProgram>>
pub fn get_executors_which_were_deployed( &mut self ) -> HashMap<Pubkey, Arc<LoadedProgram>>
Trait Implementations§
source§impl Debug for TransactionExecutorCache
impl Debug for TransactionExecutorCache
source§impl Default for TransactionExecutorCache
impl Default for TransactionExecutorCache
source§fn default() -> TransactionExecutorCache
fn default() -> TransactionExecutorCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TransactionExecutorCache
impl Send for TransactionExecutorCache
impl Sync for TransactionExecutorCache
impl Unpin for TransactionExecutorCache
impl UnwindSafe for TransactionExecutorCache
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more