6 #ifndef IROHA_ON_DEMAND_ORDERING_GATE_HPP 7 #define IROHA_ON_DEMAND_ORDERING_GATE_HPP 11 #include <shared_mutex> 13 #include <boost/variant.hpp> 14 #include <rxcpp/rx-lite.hpp> 25 class TxPresenceCache;
41 std::shared_ptr<const LedgerState> ledger_state)
42 : next_round(
std::move(next_round)),
43 ledger_state(
std::move(ledger_state)) {}
47 std::shared_ptr<OnDemandOrderingService> ordering_service,
48 std::unique_ptr<transport::OdOsNotification> network_client,
50 std::shared_ptr<const cache::OrderingGateCache::HashesSetType>>
52 rxcpp::observable<RoundSwitch> round_switch_events,
53 std::shared_ptr<cache::OrderingGateCache>
56 std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
58 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache,
59 std::shared_ptr<ProposalCreationStrategy> proposal_creation_strategy,
60 size_t transaction_limit,
66 std::shared_ptr<shared_model::interface::TransactionBatch> batch)
69 rxcpp::observable<network::OrderingEvent> onProposal()
override;
77 boost::optional<std::shared_ptr<const shared_model::interface::Proposal>>
78 processProposalRequest(
80 std::shared_ptr<const OnDemandOrderingService::ProposalType>>
83 void sendCachedTransactions();
88 std::shared_ptr<const shared_model::interface::Proposal>
89 removeReplaysAndDuplicates(
90 std::shared_ptr<const shared_model::interface::Proposal> proposal)
96 size_t transaction_limit_;
97 std::shared_ptr<OnDemandOrderingService> ordering_service_;
98 std::unique_ptr<transport::OdOsNotification> network_client_;
99 rxcpp::composite_subscription processed_tx_hashes_subscription_;
100 rxcpp::composite_subscription round_switch_subscription_;
101 std::shared_ptr<cache::OrderingGateCache> cache_;
102 std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
104 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache_;
106 std::shared_timed_mutex stop_mutex_;
107 bool stop_requested_{
false};
109 rxcpp::composite_subscription proposal_notifier_lifetime_;
110 rxcpp::subjects::subject<network::OrderingEvent> proposal_notifier_;
116 #endif // IROHA_ON_DEMAND_ORDERING_GATE_HPP
Definition: ordering_gate.hpp:28
RoundSwitch(consensus::Round next_round, std::shared_ptr< const LedgerState > ledger_state)
Definition: on_demand_ordering_gate.hpp:40
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: block_query.hpp:15
Definition: on_demand_ordering_gate.hpp:36
std::shared_ptr< const LedgerState > ledger_state
Definition: on_demand_ordering_gate.hpp:38
Definition: on_demand_ordering_gate.hpp:34
consensus::Round next_round
Definition: on_demand_ordering_gate.hpp:37