hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
peer.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PLAIN_PEER_HPP
7 #define IROHA_SHARED_MODEL_PLAIN_PEER_HPP
8 
11 
12 #include <boost/optional.hpp>
13 
14 namespace shared_model {
15  namespace plain {
16 
17  class Peer final : public interface::Peer {
18  public:
20  const interface::types::PubkeyType &public_key,
21  const boost::optional<interface::types::TLSCertificateType>
22  &tls_certificate);
23 
24  const interface::types::AddressType &address() const override;
25 
26  const interface::types::PubkeyType &pubkey() const override;
27 
28  const boost::optional<interface::types::TLSCertificateType>
29  &tlsCertificate() const override;
30 
31  private:
32  const interface::types::AddressType address_;
33  const interface::types::PubkeyType public_key_;
34  const boost::optional<interface::types::TLSCertificateType>
35  tls_certificate_;
36  };
37 
38  } // namespace plain
39 } // namespace shared_model
40 
41 #endif // IROHA_SHARED_MODEL_PLAIN_PEER_HPP
std::string AddressType
Type of peer address.
Definition: types.hpp:45
Definition: peer.hpp:20
const interface::types::PubkeyType & pubkey() const override
Definition: peer.cpp:23
Definition: peer.hpp:17
const boost::optional< interface::types::TLSCertificateType > & tlsCertificate() const override
Definition: peer.cpp:28
Definition: public_key.hpp:16
const interface::types::AddressType & address() const override
Definition: peer.cpp:19
Definition: command_executor.hpp:12
Peer(const interface::types::AddressType &address, const interface::types::PubkeyType &public_key, const boost::optional< interface::types::TLSCertificateType > &tls_certificate)
Definition: peer.cpp:11