hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
peer_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PEER_QUERY_HPP
7 #define IROHA_PEER_QUERY_HPP
8 
9 #include <memory>
10 #include <vector>
11 
12 #include <boost/optional.hpp>
15 
16 namespace shared_model {
17  namespace interface {
18  class Peer;
19  } // namespace interface
20 } // namespace shared_model
21 
22 namespace iroha {
23  namespace ametsuchi {
24 
28  class PeerQuery {
29  protected:
30  using wPeer = std::shared_ptr<shared_model::interface::Peer>;
31 
32  public:
33  // TODO andrei 17.10.18 IR-1764 Make PeerQuery::getLedgerPeers const
34 
39  virtual boost::optional<std::vector<wPeer>> getLedgerPeers() = 0;
40 
45  virtual boost::optional<PeerQuery::wPeer> getLedgerPeerByPublicKey(
46  shared_model::interface::types::PublicKeyHexStringView public_key)
47  const = 0;
48 
49  virtual ~PeerQuery() = default;
50  };
51 
52  } // namespace ametsuchi
53 } // namespace iroha
54 #endif // IROHA_PEER_QUERY_HPP
Definition: peer_query.hpp:28
Definition: block_query.hpp:15
std::shared_ptr< shared_model::interface::Peer > wPeer
Definition: peer_query.hpp:30
Definition: command_executor.hpp:12