Struct jormungandr::fragment::Pool
source · pub struct Pool {
logs: Logs,
pool: Pool,
network_msg_box: MessageBox<NetworkMsg>,
persistent_log: Option<BufWriter<File>>,
metrics: Metrics,
}
Fields§
§logs: Logs
§pool: Pool
§network_msg_box: MessageBox<NetworkMsg>
§persistent_log: Option<BufWriter<File>>
§metrics: Metrics
Implementations§
source§impl Pool
impl Pool
pub fn new( max_entries: usize, logs: Logs, network_msg_box: MessageBox<NetworkMsg>, persistent_log: Option<File>, metrics: Metrics ) -> Self
pub fn logs(&mut self) -> &mut Logs
sourcepub fn set_persistent_log(&mut self, file: File)
pub fn set_persistent_log(&mut self, file: File)
Sets the persistent log to a file. The file must be opened for writing.
sourcepub async fn close_persistent_log(&mut self)
pub async fn close_persistent_log(&mut self)
Synchronizes the persistent log file contents and metadata to the file system and closes the file.
async fn filter_fragment( &mut self, fragment: &Fragment, id: FragmentId ) -> Result<(), FragmentRejectionReason>
sourcepub async fn insert_and_propagate_all(
&mut self,
origin: FragmentOrigin,
fragments: Vec<Fragment>,
fail_fast: bool
) -> Result<FragmentsProcessingSummary, Error>
pub async fn insert_and_propagate_all( &mut self, origin: FragmentOrigin, fragments: Vec<Fragment>, fail_fast: bool ) -> Result<FragmentsProcessingSummary, Error>
Returns number of registered fragments. Setting fail_fast
to true
will force this
method to reject all fragments after the first invalid fragments was met.
pub fn remove_added_to_block( &mut self, fragment_ids: Vec<FragmentId>, status: FragmentStatus )
pub async fn select( &mut self, ledger: ApplyBlockLedger, selection_alg: FragmentSelectionAlgorithmParams, soft_deadline_future: Receiver<()>, hard_deadline_future: Receiver<()> ) -> (Contents, ApplyBlockLedger)
pub fn prune_after_ledger_branch(&mut self, branch_date: BlockDateDto)
fn update_metrics(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl !UnwindSafe for Pool
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