hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_blocks_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
7 #define IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
8 
10 
12 #include "queries.pb.h"
13 
14 namespace shared_model {
15  namespace proto {
16  class BlocksQuery final : public interface::BlocksQuery {
17  public:
18  using TransportType = iroha::protocol::BlocksQuery;
19 
20  explicit BlocksQuery(const TransportType &query);
21  explicit BlocksQuery(TransportType &&query);
22 
23  const interface::types::AccountIdType &creatorAccountId() const override;
24 
26 
27  const interface::types::BlobType &blob() const override;
28 
29  const interface::types::BlobType &payload() const override;
30 
31  // ------------------------| Signable override |-------------------------
33 
34  bool addSignature(const crypto::Signed &signed_blob,
35  const crypto::PublicKey &public_key) override;
36 
37  const interface::types::HashType &hash() const override;
38 
40 
41  const TransportType &getTransport() const;
42 
43  private:
44  // ------------------------------| fields |-------------------------------
45  TransportType proto_;
46 
47  const interface::types::BlobType blob_;
48 
49  const interface::types::BlobType payload_;
50 
52 
54  };
55  } // namespace proto
56 } // namespace shared_model
57 
58 #endif // IROHA_SHARED_MODEL_PROTO_BLOCKS_QUERY_HPP
interface::types::CounterType queryCounter() const override
Definition: proto_blocks_query.cpp:34
std::unordered_set< T, SignatureSetTypeOps, SignatureSetTypeOps > SignatureSetType
Definition: signable.hpp:135
Definition: hash.hpp:18
Definition: blob.hpp:25
Definition: blocks_query.hpp:20
const interface::types::HashType & hash() const override
Definition: proto_blocks_query.cpp:64
bool addSignature(const crypto::Signed &signed_blob, const crypto::PublicKey &public_key) override
Definition: proto_blocks_query.cpp:50
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
const TransportType & getTransport() const
Definition: proto_blocks_query.cpp:72
std::string AccountIdType
Type of account id.
Definition: types.hpp:39
const interface::types::BlobType & payload() const override
Definition: proto_blocks_query.cpp:42
interface::types::TimestampType createdTime() const override
Definition: proto_blocks_query.cpp:68
Definition: signed.hpp:17
interface::types::SignatureRangeType signatures() const override
Definition: proto_blocks_query.cpp:46
const interface::types::AccountIdType & creatorAccountId() const override
Definition: proto_blocks_query.cpp:29
uint64_t CounterType
Type of counter.
Definition: types.hpp:66
Definition: public_key.hpp:16
Definition: command_executor.hpp:12
BlocksQuery(const TransportType &query)
Definition: proto_blocks_query.cpp:13
Definition: proto_blocks_query.hpp:16
const interface::types::BlobType & blob() const override
Definition: proto_blocks_query.cpp:38
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:64
iroha::protocol::BlocksQuery TransportType
Definition: proto_blocks_query.hpp:18