6 #ifndef IROHA_SIMULATOR_HPP 7 #define IROHA_SIMULATOR_HPP 12 #include <boost/optional.hpp> 13 #include <rxcpp/rx-lite.hpp> 23 class CommandExecutor;
36 std::unique_ptr<iroha::ametsuchi::CommandExecutor> command_executor,
37 std::shared_ptr<network::OrderingGate> ordering_gate,
38 std::shared_ptr<validation::StatefulValidator> statefulValidator,
39 std::shared_ptr<ametsuchi::TemporaryFactory> factory,
40 std::shared_ptr<CryptoSignerType> crypto_signer,
41 std::unique_ptr<shared_model::interface::UnsafeBlockFactory>
47 std::shared_ptr<validation::VerifiedProposalAndErrors> processProposal(
50 rxcpp::observable<VerifiedProposalCreatorEvent> onVerifiedProposal()
53 boost::optional<std::shared_ptr<shared_model::interface::Block>>
54 processVerifiedProposal(
55 const std::shared_ptr<iroha::validation::VerifiedProposalAndErrors>
56 &verified_proposal_and_errors,
59 rxcpp::observable<BlockCreatorEvent> onBlock()
override;
63 std::shared_ptr<iroha::ametsuchi::CommandExecutor> command_executor_;
65 rxcpp::composite_subscription notifier_lifetime_;
66 rxcpp::subjects::subject<VerifiedProposalCreatorEvent> notifier_;
67 rxcpp::composite_subscription block_notifier_lifetime_;
68 rxcpp::subjects::subject<BlockCreatorEvent> block_notifier_;
70 rxcpp::composite_subscription proposal_subscription_;
71 rxcpp::composite_subscription verified_proposal_subscription_;
73 std::shared_ptr<validation::StatefulValidator> validator_;
74 std::shared_ptr<ametsuchi::TemporaryFactory> ametsuchi_factory_;
75 std::shared_ptr<CryptoSignerType> crypto_signer_;
76 std::unique_ptr<shared_model::interface::UnsafeBlockFactory>
84 #endif // IROHA_SIMULATOR_HPP
static const model::converters::PbBlockFactory block_factory
Definition: sha3_hash.cpp:15
Definition: simulator.hpp:28
Definition: proposal.hpp:17
Definition: ledger_state.hpp:14
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: verified_proposal_creator.hpp:28
Definition: block_query.hpp:15
Definition: block_creator.hpp:22
Definition: abstract_crypto_model_signer.hpp:16