hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
cleanup_strategy.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CLEANUP_STRATEGY_HPP
7 #define IROHA_CLEANUP_STRATEGY_HPP
8 
9 #include <vector>
10 
11 #include <boost/optional.hpp>
12 
13 #include "consensus/round.hpp"
15 
16 namespace iroha::consensus::yac {
18  public:
22  using RoundsType = std::vector<Round>;
23 
30  virtual boost::optional<RoundsType> finalize(Round round,
31  Answer answer) = 0;
32 
38  virtual bool shouldCreateRound(const Round &round) = 0;
39 
40  virtual ~CleanupStrategy() = default;
41  };
42 } // namespace iroha::consensus::yac
43 
44 #endif // IROHA_CLEANUP_STRATEGY_HPP
virtual bool shouldCreateRound(const Round &round)=0
Definition: cleanup_strategy.hpp:17
virtual boost::optional< RoundsType > finalize(Round round, Answer answer)=0
std::vector< Round > RoundsType
Definition: cleanup_strategy.hpp:22
boost::variant< CommitMessage, RejectMessage, FutureMessage > Answer
Definition: storage_result.hpp:19
Definition: round.hpp:31
Definition: cluster_order.hpp:16