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)
pub fn set( &mut self, key: Pubkey, executor: Arc<LoadedProgram>, upgrade: bool, delay_visibility_of_program_deployment: bool )
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