Function hotshot_task_impls::vote_collection::handle_vote

source ·
pub async fn handle_vote<TYPES: NodeType, VOTE: Vote<TYPES> + AggregatableVote<TYPES, VOTE, CERT> + Send + Sync + 'static, CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment> + Debug + Send + Sync + 'static, V: Versions>(
    collectors: &mut VoteCollectorsMap<TYPES, VOTE, CERT, V>,
    vote: &VOTE,
    public_key: TYPES::SignatureKey,
    membership: &Arc<RwLock<TYPES::Membership>>,
    epoch: TYPES::Epoch,
    id: u64,
    event: &Arc<HotShotEvent<TYPES>>,
    event_stream: &Sender<Arc<HotShotEvent<TYPES>>>,
    upgrade_lock: &UpgradeLock<TYPES, V>,
    transition_indicator: EpochTransitionIndicator,
) -> Result<()>
where VoteCollectionTaskState<TYPES, VOTE, CERT, V>: HandleVoteEvent<TYPES, VOTE, CERT>,
Expand description

A helper function that handles a vote regardless whether it’s the first vote in the view or not.

§Errors

If we fail to handle the vote