hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ordering::ProposalCreationStrategy Class Referenceabstract

#include "ordering_service_proposal_creation_strategy.hpp"

Inheritance diagram for iroha::ordering::ProposalCreationStrategy:
Inheritance graph
Collaboration diagram for iroha::ordering::ProposalCreationStrategy:
Collaboration graph

Public Types

using RoundType = consensus::Round
 shortcut for round type More...
 

Public Member Functions

virtual void onCollaborationOutcome (RoundType round, size_t peers_in_round)=0
 
virtual bool shouldCreateRound (RoundType round)=0
 
virtual boost::optional< RoundTypeonProposalRequest (RoundType requested_round)=0
 
virtual ~ProposalCreationStrategy ()=default
 

Detailed Description

Class provides a strategy for creation proposals regarding to new rounds and requests from other peers

Member Typedef Documentation

Constructor & Destructor Documentation

virtual iroha::ordering::ProposalCreationStrategy::~ProposalCreationStrategy ( )
virtualdefault

Member Function Documentation

virtual void iroha::ordering::ProposalCreationStrategy::onCollaborationOutcome ( RoundType  round,
size_t  peers_in_round 
)
pure virtual

Indicates the start of new round.

Parameters
round- proposal round which has started
peers_in_round- peers which participate in new round

Implemented in iroha::ordering::KickOutProposalCreationStrategy.

virtual boost::optional<RoundType> iroha::ordering::ProposalCreationStrategy::onProposalRequest ( RoundType  requested_round)
pure virtual

Notify the strategy about proposal request

Parameters
requested_round- in which round proposal is requested
Returns
round where proposal is required to be created immediately

Implemented in iroha::ordering::KickOutProposalCreationStrategy.

virtual bool iroha::ordering::ProposalCreationStrategy::shouldCreateRound ( RoundType  round)
pure virtual
Parameters
round- new consensus round
Returns
true, if proposal should be created in the new round

Implemented in iroha::ordering::KickOutProposalCreationStrategy.


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