pub struct LoadedPrograms { /* private fields */ }Implementations§
source§impl LoadedPrograms
impl LoadedPrograms
sourcepub fn insert_entry(
&mut self,
key: Pubkey,
entry: LoadedProgram
) -> LoadedProgramEntry
pub fn insert_entry( &mut self, key: Pubkey, entry: LoadedProgram ) -> LoadedProgramEntry
Inserts a single entry
sourcepub fn prune<F: ForkGraph>(&mut self, fork_graph: &F, new_root: Slot)
pub fn prune<F: ForkGraph>(&mut self, fork_graph: &F, new_root: Slot)
Before rerooting the blockstore this removes all programs of orphan forks
sourcepub fn extract<S: WorkingSlot>(
&self,
working_slot: &S,
keys: impl Iterator<Item = Pubkey>
) -> (HashMap<Pubkey, Arc<LoadedProgram>>, Vec<Pubkey>)
pub fn extract<S: WorkingSlot>( &self, working_slot: &S, keys: impl Iterator<Item = Pubkey> ) -> (HashMap<Pubkey, Arc<LoadedProgram>>, Vec<Pubkey>)
Extracts a subset of the programs relevant to a transaction batch and returns which program accounts the accounts DB needs to load.
sourcepub fn sort_and_evict(&mut self)
pub fn sort_and_evict(&mut self)
Evicts programs which were used infrequently
sourcepub fn remove_entries(&mut self, _key: impl Iterator<Item = Pubkey>)
pub fn remove_entries(&mut self, _key: impl Iterator<Item = Pubkey>)
Removes the entries at the given keys, if they exist
Trait Implementations§
source§impl AbiExample for LoadedPrograms
impl AbiExample for LoadedPrograms
source§impl Debug for LoadedPrograms
impl Debug for LoadedPrograms
source§impl Default for LoadedPrograms
impl Default for LoadedPrograms
source§fn default() -> LoadedPrograms
fn default() -> LoadedPrograms
Returns the “default value” for a type. Read more