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
sourceimpl 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_banks(&self) -> Vec<Slot>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn root(&self) -> Slot
pub fn set_snapshot_config(&mut self, snapshot_config: Option<SnapshotConfig>)
pub fn set_accounts_hash_interval_slots(&mut self, accounts_interval_slots: u64)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for BankForks
impl Send for BankForks
impl Sync for BankForks
impl Unpin for BankForks
impl !UnwindSafe for BankForks
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more