Struct solana_runtime::bank_forks::BankForks
source · pub struct BankForks {
pub snapshot_config: Option<SnapshotConfig>,
pub accounts_hash_interval_slots: Slot,
/* private fields */
}
Fields§
§snapshot_config: Option<SnapshotConfig>
§accounts_hash_interval_slots: Slot
Implementations§
source§impl BankForks
impl BankForks
pub fn new(bank: Bank) -> Self
pub fn banks(&self) -> HashMap<Slot, Arc<Bank>>
pub fn get_vote_only_mode_signal(&self) -> Arc<AtomicBool>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn ancestors(&self) -> HashMap<Slot, HashSet<Slot>>
pub fn ancestors(&self) -> HashMap<Slot, HashSet<Slot>>
Create a map of bank slot id to the set of ancestors for the bank slot.
sourcepub fn descendants(&self) -> HashMap<Slot, HashSet<Slot>>
pub fn descendants(&self) -> HashMap<Slot, HashSet<Slot>>
Create a map of bank slot id to the set of all of its descendants
pub fn frozen_banks(&self) -> HashMap<Slot, Arc<Bank>>
pub fn active_bank_slots(&self) -> Vec<Slot> ⓘ
pub fn get(&self, bank_slot: Slot) -> Option<Arc<Bank>>
pub fn get_with_checked_hash( &self, (bank_slot, expected_hash): (Slot, Hash) ) -> Option<Arc<Bank>>
pub fn bank_hash(&self, slot: Slot) -> Option<Hash>
pub fn root_bank(&self) -> Arc<Bank>
pub fn new_from_banks(initial_forks: &[Arc<Bank>], root: Slot) -> Self
pub fn insert(&mut self, bank: Bank) -> Arc<Bank>
pub fn remove(&mut self, slot: Slot) -> Option<Arc<Bank>>
pub fn highest_slot(&self) -> Slot
pub fn working_bank(&self) -> Arc<Bank>
pub fn set_root( &mut self, root: Slot, accounts_background_request_sender: &AbsRequestSender, highest_confirmed_root: Option<Slot> ) -> Vec<Arc<Bank>> ⓘ
pub fn root(&self) -> Slot
sourcepub fn get_atomic_root(&self) -> ReadOnlyAtomicSlot
pub fn get_atomic_root(&self) -> ReadOnlyAtomicSlot
Gets a read-only wrapper to an atomic slot holding the root slot.