Trait hotshot_types::vote::Vote
source · pub trait Vote<TYPES: NodeType>: HasViewNumber<TYPES> {
type Commitment: Voteable<TYPES>;
// 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§
sourcetype Commitment: Voteable<TYPES>
type Commitment: Voteable<TYPES>
Type of data commitment this vote uses.
Required Methods§
sourcefn signature(
&self,
) -> <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType
fn signature( &self, ) -> <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType
Get the signature of the vote sender
sourcefn date(&self) -> &Self::Commitment
fn date(&self) -> &Self::Commitment
Gets the data which was voted on by this vote
sourcefn data_commitment(&self) -> Commitment<Self::Commitment>
fn data_commitment(&self) -> Commitment<Self::Commitment>
Gets the Data commitment of the vote
sourcefn signing_key(&self) -> TYPES::SignatureKey
fn signing_key(&self) -> TYPES::SignatureKey
Gets the public signature key of the votes creator/sender