Trait hotshot_types::vote::Vote

source ·
pub trait Vote<TYPES: NodeType>: HasViewNumber<TYPES> {
    type Commitment: Voteable;

    // Required methods
    fn signature(
        &self,
    ) -> <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType;
    fn date(&self) -> &Self::Commitment;
    fn data_commitment(&self) -> Commitment<Self::Commitment>;
    fn signing_key(&self) -> TYPES::SignatureKey;
}
Expand description

A simple vote that has a signer and commitment to the data voted on.

Required Associated Types§

source

type Commitment: Voteable

Type of data commitment this vote uses.

Required Methods§

source

fn signature( &self, ) -> <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType

Get the signature of the vote sender

source

fn date(&self) -> &Self::Commitment

Gets the data which was voted on by this vote

source

fn data_commitment(&self) -> Commitment<Self::Commitment>

Gets the Data commitment of the vote

source

fn signing_key(&self) -> TYPES::SignatureKey

Gets the public signature key of the votes creator/sender

Implementors§

source§

impl<TYPES: NodeType, DATA: Voteable + 'static> Vote<TYPES> for SimpleVote<TYPES, DATA>

source§

type Commitment = DATA