pub struct TransactionExecutorCache {
pub executors: HashMap<Pubkey, TransactionExecutorCacheEntry>,
}
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§
§executors: HashMap<Pubkey, TransactionExecutorCacheEntry>
Implementations§
source§impl TransactionExecutorCache
impl TransactionExecutorCache
pub fn new( executable_keys: impl Iterator<Item = (Pubkey, Arc<dyn Executor>)> ) -> Self
pub fn get(&self, key: &Pubkey) -> Option<Arc<dyn Executor>>
pub fn set(&mut self, key: Pubkey, executor: Arc<dyn Executor>, replacement: bool)
pub fn update_global_cache( &self, global_cache: &RwLock<BankExecutorCache>, selector: impl Fn(TxBankExecutorCacheDiff) -> bool )
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