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
Auto Trait Implementations§
impl Freeze for TransactionExecutorCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more