hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
ordering_service_proposal_creation_strategy.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_ORDERING_SERVICE_PROPOSAL_CREATION_STRATEGY_HPP
7 #define IROHA_ORDERING_SERVICE_PROPOSAL_CREATION_STRATEGY_HPP
8 
9 #include <boost/optional.hpp>
10 #include "consensus/round.hpp"
11 
12 namespace iroha {
13  namespace ordering {
14 
20  public:
23 
29  virtual void onCollaborationOutcome(RoundType round,
30  size_t peers_in_round) = 0;
31 
36  virtual bool shouldCreateRound(RoundType round) = 0;
37 
43  virtual boost::optional<RoundType> onProposalRequest(
44  RoundType requested_round) = 0;
45 
46  virtual ~ProposalCreationStrategy() = default;
47  };
48  } // namespace ordering
49 } // namespace iroha
50 
51 #endif // IROHA_ORDERING_SERVICE_PROPOSAL_CREATION_STRATEGY_HPP
Definition: block_query.hpp:14
Definition: ordering_service_proposal_creation_strategy.hpp:19
Definition: round.hpp:31
virtual boost::optional< RoundType > onProposalRequest(RoundType requested_round)=0
virtual bool shouldCreateRound(RoundType round)=0
virtual void onCollaborationOutcome(RoundType round, size_t peers_in_round)=0