Struct solana_core::poh_recorder::PohRecorder[][src]

pub struct PohRecorder {
    pub poh: Arc<Mutex<Poh>>,
    // some fields omitted
}

Fields

poh: Arc<Mutex<Poh>>

Implementations

impl PohRecorder[src]

pub fn would_be_leader(&self, within_next_n_ticks: u64) -> bool[src]

pub fn leader_after_n_slots(&self, slots: u64) -> Option<Pubkey>[src]

pub fn next_slot_leader(&self) -> Option<Pubkey>[src]

pub fn bank(&self) -> Option<Arc<Bank>>[src]

pub fn has_bank(&self) -> bool[src]

pub fn tick_height(&self) -> u64[src]

pub fn ticks_per_slot(&self) -> u64[src]

pub fn reached_leader_slot(&self) -> (bool, u64, Slot, Slot)[src]

returns if leader slot has been reached, how many grace ticks were afforded, imputed leader_slot and self.start_slot reached_leader_slot() == true means “ready for a bank”

pub fn reset(
    &mut self,
    blockhash: Hash,
    start_slot: Slot,
    next_leader_slot: Option<(Slot, Slot)>
)
[src]

pub fn set_working_bank(&mut self, working_bank: WorkingBank)[src]

pub fn set_bank(&mut self, bank: &Arc<Bank>)[src]

pub fn tick(&mut self)[src]

pub fn record(
    &mut self,
    bank_slot: Slot,
    mixin: Hash,
    transactions: Vec<Transaction>
) -> Result<(), PohRecorderError>
[src]

pub fn new_with_clear_signal(
    tick_height: u64,
    last_entry_hash: Hash,
    start_slot: Slot,
    next_leader_slot: Option<(Slot, Slot)>,
    ticks_per_slot: u64,
    id: &Pubkey,
    blockstore: &Arc<Blockstore>,
    clear_bank_signal: Option<SyncSender<bool>>,
    leader_schedule_cache: &Arc<LeaderScheduleCache>,
    poh_config: &Arc<PohConfig>
) -> (Self, Receiver<WorkingBankEntry>)
[src]

pub fn new(
    tick_height: u64,
    last_entry_hash: Hash,
    start_slot: Slot,
    next_leader_slot: Option<(Slot, Slot)>,
    ticks_per_slot: u64,
    id: &Pubkey,
    blockstore: &Arc<Blockstore>,
    leader_schedule_cache: &Arc<LeaderScheduleCache>,
    poh_config: &Arc<PohConfig>
) -> (Self, Receiver<WorkingBankEntry>)
[src]

A recorder to synchronize PoH with the following data structures

  • bank - the LastId’s queue is updated on tick and record events
  • sender - the Entry channel that outputs to the ledger

Auto Trait Implementations

impl !RefUnwindSafe for PohRecorder

impl Send for PohRecorder

impl !Sync for PohRecorder

impl Unpin for PohRecorder

impl !UnwindSafe for PohRecorder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]