hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
on_demand_os_transport.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_ON_DEMAND_OS_TRANSPORT_HPP
7 #define IROHA_ON_DEMAND_OS_TRANSPORT_HPP
8 
9 #include <memory>
10 #include <utility>
11 #include <vector>
12 
13 #include "common/result_fwd.hpp"
14 #include "consensus/round.hpp"
16 
17 namespace shared_model {
18  namespace interface {
19  class TransactionBatch;
20  class Proposal;
21  class Peer;
22  } // namespace interface
23 } // namespace shared_model
24 
25 namespace iroha {
26  namespace ordering {
27  namespace transport {
28 
33  public:
37  using TransactionBatchType =
38  std::shared_ptr<shared_model::interface::TransactionBatch>;
39 
43  using CollectionType = std::vector<TransactionBatchType>;
44 
49  virtual void onBatches(CollectionType batches) = 0;
50 
56  virtual void onRequestProposal(consensus::Round round) = 0;
57 
58  virtual ~OdOsNotification() = default;
59  };
60 
65  public:
73  std::string>
74  create(const shared_model::interface::Peer &to) = 0;
75 
76  virtual ~OdOsNotificationFactory() = default;
77  };
78 
79  } // namespace transport
80  } // namespace ordering
81 } // namespace iroha
82 
83 #endif // IROHA_ON_DEMAND_OS_TRANSPORT_HPP
std::shared_ptr< shared_model::interface::TransactionBatch > TransactionBatchType
Definition: on_demand_os_transport.hpp:38
Definition: peer.hpp:20
Definition: result_fwd.hpp:27
Definition: on_demand_os_transport.hpp:64
Definition: block_query.hpp:15
Definition: on_demand_os_transport.hpp:32
Definition: round.hpp:31
Definition: command_executor.hpp:13
std::vector< TransactionBatchType > CollectionType
Definition: on_demand_os_transport.hpp:43