Skip to main content

Consensus

Trait Consensus 

Source
pub trait Consensus:
    ConsensusNotify
    + Clone
    + Debug {
    // Required methods
    fn validate_ballot_value(
        &self,
        slot_index: SCPSlotIndex,
        value: &SCPValue,
    ) -> ValidationLevel;
    fn validate_nomination_value(
        &self,
        slot_index: SCPSlotIndex,
        value: &SCPValue,
    ) -> ValidationLevel;
    fn extract_valid_value(
        &self,
        slot_index: SCPSlotIndex,
        value: &SCPValue,
    ) -> Option<SCPValue>;
    fn combine_candidates(
        &self,
        slot_index: SCPSlotIndex,
        candidates: &HashSet<SCPValue>,
    ) -> Option<SCPValue>;
}

Required Methods§

Source

fn validate_ballot_value( &self, slot_index: SCPSlotIndex, value: &SCPValue, ) -> ValidationLevel

Source

fn validate_nomination_value( &self, slot_index: SCPSlotIndex, value: &SCPValue, ) -> ValidationLevel

Source

fn extract_valid_value( &self, slot_index: SCPSlotIndex, value: &SCPValue, ) -> Option<SCPValue>

Source

fn combine_candidates( &self, slot_index: SCPSlotIndex, candidates: &HashSet<SCPValue>, ) -> Option<SCPValue>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§