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
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