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

#include "yac_proposal_storage.hpp"

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

Public Member Functions

 YacProposalStorage (Round store_round, PeersNumberType peers_in_round, std::shared_ptr< SupermajorityChecker > supermajority_checker=std::make_shared< SupermajorityCheckerImpl >())
 
boost::optional< Answerinsert (VoteMessage vote)
 
boost::optional< Answerinsert (std::vector< VoteMessage > messages)
 
const RoundgetStorageKey () const
 
boost::optional< AnswergetState () const
 

Detailed Description

Class for storing votes related to given proposal/block round and gain information about commits/rejects for this round

Constructor & Destructor Documentation

iroha::consensus::yac::YacProposalStorage::YacProposalStorage ( Round  store_round,
PeersNumberType  peers_in_round,
std::shared_ptr< SupermajorityChecker supermajority_checker = std::make_shared<SupermajorityCheckerImpl>() 
)

Here is the call graph for this function:

Member Function Documentation

boost::optional< Answer > iroha::consensus::yac::YacProposalStorage::getState ( ) const
Returns
current state of storage

Here is the caller graph for this function:

const Round & iroha::consensus::yac::YacProposalStorage::getStorageKey ( ) const

Provides key for storage

boost::optional< Answer > iroha::consensus::yac::YacProposalStorage::insert ( VoteMessage  vote)

Try to insert vote to storage

Parameters
vote- object for insertion
Returns
result, that contains actual state of storage. boost::none if not inserted, possible reasons - duplication, wrong proposal/block round.

Here is the call graph for this function:

Here is the caller graph for this function:

boost::optional< Answer > iroha::consensus::yac::YacProposalStorage::insert ( std::vector< VoteMessage messages)

Insert bundle of messages into storage

Parameters
messages- collection of messages
Returns
result, that contains actual state of storage, after insertion of all votes.

Here is the call graph for this function:


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