hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transaction_batch.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TRANSACTION_BATCH_HPP
7 #define IROHA_TRANSACTION_BATCH_HPP
8 
9 #include <optional>
10 
11 #include "cryptography/hash.hpp"
16 
17 namespace shared_model {
18  namespace interface {
22  class TransactionBatch : public ModelPrimitive<TransactionBatch> {
23  public:
28  virtual const types::SharedTxsCollectionType &transactions() const = 0;
29 
30  // TODO [IR-1874] Akvinikym 16.11.18: rename the field
36  virtual const types::HashType &reducedHash() const = 0;
37 
43  virtual bool hasAllSignatures() const = 0;
44 
52  virtual bool addSignature(size_t number_of_tx,
53  types::SignedHexStringView signed_blob,
54  types::PublicKeyHexStringView public_key) = 0;
55 
57  std::string toString() const;
58  };
59 
69  bool operator()(
70  const std::shared_ptr<TransactionBatch> &left_tx,
71  const std::shared_ptr<TransactionBatch> &right_tx) const;
72  };
73  } // namespace interface
74 } // namespace shared_model
75 
76 #endif // IROHA_TRANSACTION_BATCH_HPP
virtual bool hasAllSignatures() const =0
Definition: hash.hpp:18
Definition: transaction_batch.hpp:64
std::string toString() const
Pretty print the batch contents.
Definition: transaction_batch.cpp:14
Definition: transaction_batch.hpp:22
std::vector< std::shared_ptr< Transaction > > SharedTxsCollectionType
Definition: transaction_sequence_common.hpp:27
virtual const types::SharedTxsCollectionType & transactions() const =0
Definition: model_primitive.hpp:22
Definition: command_executor.hpp:12
virtual const types::HashType & reducedHash() const =0
virtual bool addSignature(size_t number_of_tx, types::SignedHexStringView signed_blob, types::PublicKeyHexStringView public_key)=0