hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
peer_orderer_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PEER_ORDERER_IMPL_HPP
7 #define IROHA_PEER_ORDERER_IMPL_HPP
8 
9 #include <memory>
10 
13 
14 namespace iroha {
15 
16  namespace consensus {
17  namespace yac {
18 
19  class ClusterOrdering;
20  class YacHash;
21 
23  public:
24  // TODO 30.01.2019 lebdron: IR-262 Remove PeerQueryFactory
25  explicit PeerOrdererImpl(
26  std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory);
27 
28  boost::optional<ClusterOrdering> getOrdering(
29  const YacHash &hash,
30  std::vector<std::shared_ptr<shared_model::interface::Peer>> const
31  &peers) override;
32 
33  private:
34  std::vector<size_t> peer_positions_;
35  std::shared_ptr<ametsuchi::PeerQueryFactory> peer_query_factory_;
36  };
37 
38  } // namespace yac
39  } // namespace consensus
40 } // namespace iroha
41 
42 #endif // IROHA_PEER_ORDERER_IMPL_HPP
PeerOrdererImpl(std::shared_ptr< ametsuchi::PeerQueryFactory > peer_query_factory)
Definition: peer_orderer_impl.cpp:19
Definition: yac_hash_provider.hpp:30
Definition: peer_orderer_impl.hpp:22
boost::optional< ClusterOrdering > getOrdering(const YacHash &hash, std::vector< std::shared_ptr< shared_model::interface::Peer >> const &peers) override
Definition: peer_orderer_impl.cpp:23
Definition: block_query.hpp:15
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
Definition: yac_peer_orderer.hpp:22