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<shared_model::interface::UnsafeProposalFactory>
55 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache,
56 std::shared_ptr<ProposalCreationStrategy> proposal_creation_strategy,
57 size_t transaction_limit,
63 std::shared_ptr<shared_model::interface::TransactionBatch> batch)
66 rxcpp::observable<network::OrderingEvent> onProposal()
override;
74 boost::optional<std::shared_ptr<const shared_model::interface::Proposal>>
75 processProposalRequest(
77 std::shared_ptr<const OnDemandOrderingService::ProposalType>>
80 void sendCachedTransactions();
85 std::shared_ptr<const shared_model::interface::Proposal>
86 removeReplaysAndDuplicates(
87 std::shared_ptr<const shared_model::interface::Proposal> proposal)
93 size_t transaction_limit_;
94 std::shared_ptr<OnDemandOrderingService> ordering_service_;
95 std::unique_ptr<transport::OdOsNotification> network_client_;
96 rxcpp::composite_subscription processed_tx_hashes_subscription_;
97 rxcpp::composite_subscription round_switch_subscription_;
98 std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
100 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache_;
102 std::shared_timed_mutex stop_mutex_;
103 bool stop_requested_{
false};
105 rxcpp::composite_subscription proposal_notifier_lifetime_;
106 rxcpp::subjects::subject<network::OrderingEvent> proposal_notifier_;
112 #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