#include "yac_block_storage.hpp"

Public Member Functions | |
| YacBlockStorage (YacHash hash, PeersNumberType peers_in_round, std::shared_ptr< SupermajorityChecker > supermajority_checker, logger::LoggerPtr log) | |
| boost::optional< Answer > | insert (VoteMessage msg) |
| boost::optional< Answer > | insert (std::vector< VoteMessage > votes) |
| std::vector< VoteMessage > | getVotes () const |
| size_t | getNumberOfVotes () const |
| boost::optional< Answer > | getState () |
| bool | isContains (const VoteMessage &msg) const |
| YacHash | getStorageKey () const |
Class provide storage of votes for one block.
| YacBlockStorage::YacBlockStorage | ( | YacHash | hash, |
| PeersNumberType | peers_in_round, | ||
| std::shared_ptr< SupermajorityChecker > | supermajority_checker, | ||
| logger::LoggerPtr | log | ||
| ) |
| size_t YacBlockStorage::getNumberOfVotes | ( | ) | const |
| boost::optional< iroha::consensus::yac::Answer > YacBlockStorage::getState | ( | ) |

| iroha::consensus::yac::YacHash YacBlockStorage::getStorageKey | ( | ) | const |
Provide key attached to this storage
| std::vector< iroha::consensus::yac::VoteMessage > YacBlockStorage::getVotes | ( | ) | const |
| boost::optional< iroha::consensus::yac::Answer > YacBlockStorage::insert | ( | VoteMessage | msg | ) |
Try to insert vote to storage
| msg | - vote for insertion |


| boost::optional< iroha::consensus::yac::Answer > YacBlockStorage::insert | ( | std::vector< VoteMessage > | votes | ) |
Insert vector of votes to current storage
| votes | - bunch of votes for insertion |

| bool YacBlockStorage::isContains | ( | const VoteMessage & | msg | ) | const |
Verify that passed vote contains in storage
| msg | - vote for finding |