#include "yac_vote_storage.hpp"

Public Member Functions | |
| YacVoteStorage (std::shared_ptr< CleanupStrategy > cleanup_strategy, std::unique_ptr< SupermajorityChecker > supermajority_checker, logger::LoggerManagerTreePtr log_manager) | |
| boost::optional< Answer > | store (std::vector< VoteMessage > state, PeersNumberType peers_in_round) |
| bool | isCommitted (const Round &round) |
| void | remove (const Round &round) |
| ProposalState | getProcessingState (const Round &round) |
| void | nextProcessingState (const Round &round) |
| boost::optional< Round > | getLastFinalizedRound () const |
| boost::optional< Answer > | getState (const Round &round) const |
Class provide storage for votes and useful methods for it.
| YacVoteStorage::YacVoteStorage | ( | std::shared_ptr< CleanupStrategy > | cleanup_strategy, |
| std::unique_ptr< SupermajorityChecker > | supermajority_checker, | ||
| logger::LoggerManagerTreePtr | log_manager | ||
| ) |
| cleanup_strategy | - strategy for removing elements from storage |
| consistency_model | - consensus consistency model (CFT, BFT). |
| log_manager | - log manager to create component loggers |
| boost::optional< iroha::consensus::Round > YacVoteStorage::getLastFinalizedRound | ( | ) | const |
Get last by order finalized round

| iroha::consensus::yac::ProposalState YacVoteStorage::getProcessingState | ( | const Round & | round | ) |
Method provide state of processing for concrete proposal/block
| round,in | which that proposal/block is being voted |

| boost::optional< iroha::consensus::yac::Answer > YacVoteStorage::getState | ( | const Round & | round | ) | const |
Get the state attached of a past round
| round | - required round |

| bool YacVoteStorage::isCommitted | ( | const Round & | round | ) |
Provide status about closing round of proposal/block
| round,in | which proposal/block is supposed to be committed |


| void YacVoteStorage::nextProcessingState | ( | const Round & | round | ) |
Mark round with following transition: kNotSentNotProcessed -> kSentNotProcessed kSentNotProcessed -> kSentProcessed kSentProcessed -> kSentProcessed
| round | - target tag |

| void YacVoteStorage::remove | ( | const Round & | round | ) |
Remove proposal storage by round

| boost::optional< iroha::consensus::yac::Answer > YacVoteStorage::store | ( | std::vector< VoteMessage > | state, |
| PeersNumberType | peers_in_round | ||
| ) |
Insert votes in storage
| state | - current message with votes |
| peers_in_round | - number of peers participated in round |
