Struct solana_core::poh_recorder::PohRecorder [−][src]
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]
&mut self,
blockhash: Hash,
start_slot: Slot,
next_leader_slot: Option<(Slot, Slot)>
)
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]
&mut self,
bank_slot: Slot,
mixin: Hash,
transactions: Vec<Transaction>
) -> Result<(), PohRecorderError>
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]
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>)
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]
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>)
A recorder to synchronize PoH with the following data structures
- bank - the LastId’s queue is updated on
tick
andrecord
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,