hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::consensus::yac::YacVoteStorage Class Reference

#include "yac_vote_storage.hpp"

Collaboration diagram for iroha::consensus::yac::YacVoteStorage:
Collaboration graph

Public Member Functions

boost::optional< Answerstore (std::vector< VoteMessage > state, PeersNumberType peers_in_round)
 
bool isCommitted (const Round &round)
 
ProposalState getProcessingState (const Round &round)
 
void nextProcessingState (const Round &round)
 

Detailed Description

Class provide storage for votes and useful methods for it.

Member Function Documentation

ProposalState iroha::consensus::yac::YacVoteStorage::getProcessingState ( const Round round)

Method provide state of processing for concrete proposal/block

Parameters
round,inwhich that proposal/block is being voted
Returns
value attached to parameter's round. Default is kNotSentNotProcessed.

Here is the caller graph for this function:

bool iroha::consensus::yac::YacVoteStorage::isCommitted ( const Round round)

Provide status about closing round of proposal/block

Parameters
round,inwhich proposal/block is supposed to be committed
Returns
true, if round closed

Here is the caller graph for this function:

void iroha::consensus::yac::YacVoteStorage::nextProcessingState ( const Round round)

Mark round with following transition: kNotSentNotProcessed -> kSentNotProcessed kSentNotProcessed -> kSentProcessed kSentProcessed -> kSentProcessed

See also
ProposalState description for transition cases
Parameters
round- target tag

Here is the caller graph for this function:

boost::optional< Answer > iroha::consensus::yac::YacVoteStorage::store ( std::vector< VoteMessage state,
PeersNumberType  peers_in_round 
)

Insert votes in storage

Parameters
state- current message with votes
peers_in_round- number of peers participated in round
Returns
structure with result of inserting. boost::none if msg not valid.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: