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 
12 #include "queries.pb.h"
13 
14 namespace shared_model {
15  namespace proto {
16  class BlocksQuery final : public CopyableProto<interface::BlocksQuery,
17  iroha::protocol::BlocksQuery,
18  BlocksQuery> {
19  public:
20  template <typename BlocksQueryType>
21  explicit BlocksQuery(BlocksQueryType &&query);
22 
23  BlocksQuery(const BlocksQuery &o);
24 
25  BlocksQuery(BlocksQuery &&o) noexcept;
26 
27  const interface::types::AccountIdType &creatorAccountId() const override;
28 
30 
31  const interface::types::BlobType &blob() const override;
32 
33  const interface::types::BlobType &payload() const override;
34 
35  // ------------------------| Signable override |-------------------------
37 
38  bool addSignature(const crypto::Signed &signed_blob,
39  const crypto::PublicKey &public_key) override;
40 
41  const interface::types::HashType &hash() const override;
42 
44 
45  private:
46  // ------------------------------| fields |-------------------------------
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:40
std::unordered_set< T, SignatureSetTypeOps, SignatureSetTypeOps > SignatureSetType
Definition: signable.hpp:135
Definition: hash.hpp:18
Definition: blob.hpp:24
const interface::types::HashType & hash() const override
Definition: proto_blocks_query.cpp:70
bool addSignature(const crypto::Signed &signed_blob, const crypto::PublicKey &public_key) override
Definition: proto_blocks_query.cpp:56
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
BlocksQuery(BlocksQueryType &&query)
Definition: proto_blocks_query.cpp:13
std::string AccountIdType
Type of account id.
Definition: types.hpp:35
const interface::types::BlobType & payload() const override
Definition: proto_blocks_query.cpp:48
interface::types::TimestampType createdTime() const override
Definition: proto_blocks_query.cpp:74
Definition: signed.hpp:17
interface::types::SignatureRangeType signatures() const override
Definition: proto_blocks_query.cpp:52
const interface::types::AccountIdType & creatorAccountId() const override
Definition: proto_blocks_query.cpp:35
uint64_t CounterType
Type of counter.
Definition: types.hpp:63
Definition: public_key.hpp:16
Definition: command_executor.hpp:12
Definition: trivial_proto.hpp:45
Definition: proto_blocks_query.hpp:16
const interface::types::BlobType & blob() const override
Definition: proto_blocks_query.cpp:44
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:59