6 #ifndef IROHA_CONSENSUS_INIT_HPP 7 #define IROHA_CONSENSUS_INIT_HPP 27 class GenericClientFactory;
36 std::shared_ptr<YacGate> initConsensusGate(
38 std::optional<shared_model::interface::types::PeerList>
40 std::shared_ptr<const LedgerState> ledger_state,
41 std::shared_ptr<network::BlockLoader> block_loader,
43 std::shared_ptr<consensus::ConsensusResultCache> block_cache,
44 std::chrono::milliseconds vote_delay_milliseconds,
47 std::shared_ptr<iroha::network::GenericClientFactory> client_factory);
49 std::shared_ptr<ServiceImpl> getConsensusNetwork()
const;
51 void subscribe(std::function<
void(
GateObject const &)> callback);
53 std::optional<GateObject> processRoundSwitch(
55 std::shared_ptr<LedgerState const> ledger_state);
58 auto createTimer(std::chrono::milliseconds delay_milliseconds);
60 bool initialized_{
false};
61 std::shared_ptr<ServiceImpl> consensus_network_;
62 std::shared_ptr<Yac> yac_;
63 std::shared_ptr<YacGateImpl> yac_gate_;
64 std::shared_ptr<BaseSubscriber<bool, std::vector<VoteMessage>>>
69 #endif // IROHA_CONSENSUS_INIT_HPP Definition: yac_gate_impl.hpp:25
Definition: consensus_init.hpp:34
Definition: keypair.hpp:19
std::variant< PairValid, VoteOther, ProposalReject, BlockReject, AgreementOnNone, Future > GateObject
Definition: gate_object.hpp:96
std::shared_ptr< LoggerManagerTree > LoggerManagerTreePtr
Definition: logger_manager_fwd.hpp:14
ConsistencyModel
Definition: consistency_model.hpp:10
Definition: cluster_order.hpp:16