hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_creator.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_BLOCK_CREATOR_HPP
7 #define IROHA_BLOCK_CREATOR_HPP
8 
9 #include <rxcpp/rx-observable-fwd.hpp>
11 
12 namespace iroha {
13  namespace validation {
14  struct VerifiedProposalAndErrors;
15  }
16 
17  namespace simulator {
18 
22  class BlockCreator {
23  public:
27  virtual boost::optional<std::shared_ptr<shared_model::interface::Block>>
28  processVerifiedProposal(
29  const std::shared_ptr<validation::VerifiedProposalAndErrors>
30  &verified_proposal_and_errors,
31  const TopBlockInfo &top_block_info) = 0;
32 
36  virtual rxcpp::observable<BlockCreatorEvent> onBlock() = 0;
37 
38  virtual ~BlockCreator() = default;
39  };
40  } // namespace simulator
41 } // namespace iroha
42 
43 #endif // IROHA_BLOCK_CREATOR_HPP
Definition: ledger_state.hpp:14
Definition: block_query.hpp:15
Definition: block_creator.hpp:22