6 #ifndef IROHA_ON_DEMAND_ORDERING_SERVICE_IMPL_HPP 7 #define IROHA_ON_DEMAND_ORDERING_SERVICE_IMPL_HPP 12 #include <shared_mutex> 14 #include <tbb/concurrent_unordered_set.h> 25 class TxPresenceCache;
36 std::shared_ptr<const transport::OdOsNotification::ProposalType>>;
53 size_t transaction_limit,
54 std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
56 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache,
57 std::shared_ptr<ProposalCreationStrategy> proposal_creation_strategy,
59 size_t number_of_proposals = 3);
69 boost::optional<std::shared_ptr<const ProposalType>> onRequestProposal(
79 using TransactionsCollectionType =
80 std::vector<std::shared_ptr<shared_model::interface::Transaction>>;
82 void tryCreateProposal(
84 const TransactionsCollectionType &txs,
97 bool batchAlreadyProcessed(
103 size_t transaction_limit_;
108 size_t number_of_proposals_;
123 std::shared_timed_mutex batches_mutex_, proposals_mutex_;
125 std::shared_ptr<shared_model::interface::UnsafeProposalFactory>
131 std::shared_ptr<ametsuchi::TxPresenceCache> tx_cache_;
136 std::shared_ptr<ProposalCreationStrategy> proposal_creation_strategy_;
146 #endif // IROHA_ON_DEMAND_ORDERING_SERVICE_IMPL_HPP
std::map< consensus::Round, std::shared_ptr< const transport::OdOsNotification::ProposalType > > ProposalMapType
Definition: on_demand_ordering_service_impl.hpp:36
Definition: transaction_batch.hpp:64
transport::OdOsNotification::TransactionBatchType TransactionBatchType
Definition: on_demand_ordering_service_impl.cpp:27
Definition: on_demand_ordering_service.hpp:17
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: on_demand_ordering_service_impl.hpp:39
Definition: block_query.hpp:15
tbb::concurrent_unordered_set< transport::OdOsNotification::TransactionBatchType, model::PointerBatchHasher, shared_model::interface::BatchHashEquality > BatchSetType
Definition: on_demand_ordering_service_impl.hpp:32
Definition: transaction_batch.hpp:22
std::vector< TransactionBatchType > CollectionType
Definition: on_demand_os_transport.hpp:47
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:67