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, logger::LoggerManagerTreePtr log_manager)
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

◆ YacProposalStorage()

iroha::consensus::yac::YacProposalStorage::YacProposalStorage ( Round  store_round,
PeersNumberType  peers_in_round,
std::shared_ptr< SupermajorityChecker supermajority_checker,
logger::LoggerManagerTreePtr  log_manager 

Member Function Documentation

◆ getState()

boost::optional< Answer > iroha::consensus::yac::YacProposalStorage::getState ( ) const
current state of storage
Here is the caller graph for this function:

◆ getStorageKey()

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

Provides key for storage

◆ insert() [1/2]

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

Try to insert vote to storage

vote- object for insertion
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:

◆ insert() [2/2]

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

Insert bundle of messages into storage

messages- collection of messages
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: