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 {
17  namespace consensus {
18  namespace yac {
20  public:
24  using RoundsType = std::vector<Round>;
25 
32  virtual boost::optional<RoundsType> finalize(Round round,
33  Answer answer) = 0;
34 
40  virtual bool shouldCreateRound(const Round &round) = 0;
41 
42  virtual ~CleanupStrategy() = default;
43  };
44  } // namespace yac
45  } // namespace consensus
46 } // namespace iroha
47 
48 #endif // IROHA_CLEANUP_STRATEGY_HPP
virtual bool shouldCreateRound(const Round &round)=0
boost::variant< CommitMessage, RejectMessage > Answer
Definition: storage_result.hpp:21
Definition: block_query.hpp:14
Definition: cleanup_strategy.hpp:19
virtual boost::optional< RoundsType > finalize(Round round, Answer answer)=0
std::vector< Round > RoundsType
Definition: cleanup_strategy.hpp:24
Definition: round.hpp:31