pub struct LedgerCleanupService { /* private fields */ }

Implementations

Checks for new roots and initiates a cleanup if the last cleanup was at least purge_interval slots ago. A cleanup will no-op if the ledger already has fewer than max_ledger_shreds; otherwise, the cleanup will purge enough slots to get the ledger size below max_ledger_shreds.

[new_root_receiver]: signal receiver which contains the information about what Slot is the current root. [max_ledger_shreds]: the number of shreds to keep since the new root. [last_purge_slot]: an both an input and output parameter indicating the id of the last purged slot. As an input parameter, it works together with purge_interval on whether it is too early to perform ledger cleanup. As an output parameter, it will be updated if this function actually performs the ledger cleanup. [purge_interval]: the minimum slot interval between two ledger cleanup. When the root derived from new_root_receiver minus last_purge_slot is fewer than purge_interval, the function will simply return Ok without actually running the ledger cleanup. In this case, purge_interval will remain unchanged. [last_compact_slot]: an output value which indicates the most recent slot which has been cleaned up after this call. If this parameter is updated after this function call, it means the ledger cleanup has been performed.

Also see blockstore::purge_slot.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request

Wrap the input message T in a tonic::Request

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more