hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_creator_common.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_BLOCK_CREATOR_COMMON_HPP
7 #define IROHA_BLOCK_CREATOR_COMMON_HPP
8 
9 #include <memory>
10 
11 #include <boost/optional.hpp>
13 #include "consensus/round.hpp"
14 
15 namespace shared_model {
16  namespace interface {
17  class Block;
18  class Proposal;
19  } // namespace interface
20 } // namespace shared_model
21 
22 namespace iroha {
23  namespace simulator {
24 
25  struct RoundData {
26  std::shared_ptr<const shared_model::interface::Proposal> proposal;
27  std::shared_ptr<shared_model::interface::Block> block;
28  };
29 
35  boost::optional<RoundData> round_data;
37  std::shared_ptr<LedgerState> ledger_state;
38  };
39 
40  std::shared_ptr<shared_model::interface::Block> getBlockUnsafe(
41  const BlockCreatorEvent &event);
42 
43  } // namespace simulator
44 } // namespace iroha
45 
46 #endif // IROHA_BLOCK_CREATOR_COMMON_HPP
Definition: block_creator_common.hpp:34
std::shared_ptr< shared_model::interface::Block > block
Definition: block_creator_common.hpp:27
Definition: block_creator_common.hpp:25
consensus::Round round
Definition: block_creator_common.hpp:36
Definition: block_query.hpp:16
std::shared_ptr< shared_model::interface::Block > getBlockUnsafe(const BlockCreatorEvent &event)
Definition: block_creator_common.cpp:11
boost::optional< RoundData > round_data
Definition: block_creator_common.hpp:35
std::shared_ptr< const shared_model::interface::Proposal > proposal
Definition: block_creator_common.hpp:26
Definition: round.hpp:31
Definition: command_executor.hpp:12
std::shared_ptr< LedgerState > ledger_state
Definition: block_creator_common.hpp:37