Skip to main content

CheckpointSummaryExt

Trait CheckpointSummaryExt 

Source
pub trait CheckpointSummaryExt: Sized + Sealed {
    // Required methods
    fn new_with_protocol_config(
        protocol_config: &ProtocolConfig,
        epoch: EpochId,
        sequence_number: CheckpointSequenceNumber,
        network_total_transactions: u64,
        transactions: &CheckpointContents,
        previous_digest: Option<CheckpointDigest>,
        epoch_rolling_gas_cost_summary: GasCostSummary,
        end_of_epoch_data: Option<EndOfEpochData>,
        timestamp_ms: CheckpointTimestamp,
        randomness_rounds: Vec<RandomnessRound>,
    ) -> Self;
    fn verify_epoch(&self, epoch: EpochId) -> IotaResult;
    fn timestamp(&self) -> SystemTime;
    fn report_checkpoint_age(&self, metrics: &Histogram);
    fn parse_version_specific_data(
        &self,
        config: &ProtocolConfig,
    ) -> Result<Option<CheckpointVersionSpecificData>>;
}
Expand description

Node-only helpers for CheckpointSummary, which is defined in iota_sdk_types. These live on an extension trait because inherent methods cannot be added to a type that is foreign to this crate.

Required Methods§

Source

fn new_with_protocol_config( protocol_config: &ProtocolConfig, epoch: EpochId, sequence_number: CheckpointSequenceNumber, network_total_transactions: u64, transactions: &CheckpointContents, previous_digest: Option<CheckpointDigest>, epoch_rolling_gas_cost_summary: GasCostSummary, end_of_epoch_data: Option<EndOfEpochData>, timestamp_ms: CheckpointTimestamp, randomness_rounds: Vec<RandomnessRound>, ) -> Self

Source

fn verify_epoch(&self, epoch: EpochId) -> IotaResult

Source

fn timestamp(&self) -> SystemTime

Source

fn report_checkpoint_age(&self, metrics: &Histogram)

Source

fn parse_version_specific_data( &self, config: &ProtocolConfig, ) -> Result<Option<CheckpointVersionSpecificData>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§