pub trait HandleVoteEvent<TYPES, VOTE, CERT>
where TYPES: NodeType, VOTE: Vote<TYPES> + AggregatableVote<TYPES, VOTE, CERT>, CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment> + Debug,
{ // Required methods fn handle_vote_event<'life0, 'life1, 'async_trait>( &'life0 mut self, event: Arc<HotShotEvent<TYPES>>, sender: &'life1 Sender<Arc<HotShotEvent<TYPES>>>, ) -> Pin<Box<dyn Future<Output = Result<Option<CERT>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn filter(event: Arc<HotShotEvent<TYPES>>) -> bool; }
Expand description

Trait for types which will handle a vote event.

Required Methods§

source

fn handle_vote_event<'life0, 'life1, 'async_trait>( &'life0 mut self, event: Arc<HotShotEvent<TYPES>>, sender: &'life1 Sender<Arc<HotShotEvent<TYPES>>>, ) -> Pin<Box<dyn Future<Output = Result<Option<CERT>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle a vote event

§Errors

Returns an error if we fail to handle the vote

source

fn filter(event: Arc<HotShotEvent<TYPES>>) -> bool

Event filter to use for this event

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, DaData2<TYPES>>, SimpleCertificate<TYPES, DaData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, DaVote2<TYPES>, DaCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, NextEpochQuorumData2<TYPES>>, SimpleCertificate<TYPES, NextEpochQuorumData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, NextEpochQuorumVote2<TYPES>, NextEpochQuorumCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, QuorumData2<TYPES>>, SimpleCertificate<TYPES, QuorumData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, QuorumVote2<TYPES>, QuorumCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, TimeoutData2<TYPES>>, SimpleCertificate<TYPES, TimeoutData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, TimeoutVote2<TYPES>, TimeoutCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, UpgradeProposalData<TYPES>>, SimpleCertificate<TYPES, UpgradeProposalData<TYPES>, UpgradeThreshold>> for VoteCollectionTaskState<TYPES, UpgradeVote<TYPES>, UpgradeCertificate<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, ViewSyncCommitData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncCommitData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, ViewSyncCommitVote2<TYPES>, ViewSyncCommitCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, ViewSyncFinalizeData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncFinalizeData2<TYPES>, SuccessThreshold>> for VoteCollectionTaskState<TYPES, ViewSyncFinalizeVote2<TYPES>, ViewSyncFinalizeCertificate2<TYPES>, V>

source§

impl<TYPES: NodeType, V: Versions> HandleVoteEvent<TYPES, SimpleVote<TYPES, ViewSyncPreCommitData2<TYPES>>, SimpleCertificate<TYPES, ViewSyncPreCommitData2<TYPES>, OneHonestThreshold>> for VoteCollectionTaskState<TYPES, ViewSyncPreCommitVote2<TYPES>, ViewSyncPreCommitCertificate2<TYPES>, V>