Struct jormungandr::leadership::Module
source · pub struct Module {
schedule: Option<Schedule>,
service_info: TokioServiceInfo,
logs: Logs,
tip_ref: Arc<Ref>,
tip: Tip,
pool: MessageBox<TransactionMsg>,
enclave: Enclave,
block_message: MessageBox<BlockMsg>,
rewards_report_all: bool,
block_hard_deadline: u32,
}
Fields§
§schedule: Option<Schedule>
§service_info: TokioServiceInfo
§logs: Logs
§tip_ref: Arc<Ref>
§tip: Tip
§pool: MessageBox<TransactionMsg>
§enclave: Enclave
§block_message: MessageBox<BlockMsg>
§rewards_report_all: bool
§block_hard_deadline: u32
Implementations§
source§impl Module
impl Module
pub async fn new(config: ModuleConfig) -> Result<Self, LeadershipError>
pub async fn run(self) -> Result<(), LeadershipError>
async fn step(self) -> Result<Self, LeadershipError>
fn current_slot(&self) -> Result<Slot, LeadershipError>
fn current_slot_position(&self) -> Result<EpochPosition, LeadershipError>
fn epoch_time(&self, epoch: Epoch) -> Result<SystemTime, LeadershipError>
fn epoch_instant(&self, epoch: Epoch) -> Result<Instant, LeadershipError>
fn slot_time(&self, epoch: Epoch, slot: EpochSlotOffset) -> SystemTime
fn event_slot_time(&self, event: &LeaderEvent) -> SystemTime
fn event_following_slot_time(&self, event: &LeaderEvent) -> SystemTime
fn event_nth_future_slot_time(&self, event: &LeaderEvent, n: u32) -> SystemTime
fn slot_instant(&self, epoch: Epoch, slot: EpochSlotOffset) -> Option<Instant>
async fn wait(self) -> Result<Self, LeadershipError>
async fn wait_peek_deadline(&mut self) -> Result<Instant, LeadershipError>
async fn action(self) -> Result<Self, LeadershipError>
async fn action_entry(self, event: LeaderEvent) -> Result<Self, LeadershipError>
async fn action_run_entry(self, entry: Entry) -> Result<Self, LeadershipError>
async fn action_run_entry_in_bound( self, entry: Entry, event_end: SystemTime, event_end_hard: SystemTime ) -> Result<Self, LeadershipError>
async fn action_run_entry_build_block( &self, entry: Entry, soft_deadline_future: Receiver<()>, hard_deadline_future: Receiver<()> ) -> Result<(), LeadershipError>
async fn action_schedule(self) -> Result<Self, LeadershipError>
async fn action_run_schedule( self, leadership: Arc<Leadership>, slot_start: u32, nb_slots: u32 ) -> Result<Self, LeadershipError>
Auto Trait Implementations§
impl !RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl !UnwindSafe for Module
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request