hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transaction_batch_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TRANSACTION_BATCH_IMPL_HPP
7 #define IROHA_TRANSACTION_BATCH_IMPL_HPP
8 
10 
11 namespace shared_model {
12  namespace interface {
13 
15  public:
16  explicit TransactionBatchImpl(
18 
21 
22  const types::SharedTxsCollectionType &transactions() const override;
23 
24  const types::HashType &reducedHash() const override;
25 
26  bool hasAllSignatures() const override;
27 
28  bool operator==(const TransactionBatch &rhs) const override;
29 
30  std::string toString() const override;
31 
32  bool addSignature(size_t number_of_tx,
33  types::SignedHexStringView signed_blob,
34  types::PublicKeyHexStringView public_key) override;
35 
36  private:
37  types::SharedTxsCollectionType transactions_;
38 
39  types::HashType reduced_hash_;
40  };
41 
42  } // namespace interface
43 } // namespace shared_model
44 
45 #endif // IROHA_TRANSACTION_BATCH_IMPL_HPP
Definition: hash.hpp:18
bool operator==(const TransactionBatch &rhs) const override
Definition: transaction_batch_impl.cpp:66
Definition: transaction_batch_impl.hpp:14
const types::SharedTxsCollectionType & transactions() const override
Definition: transaction_batch_impl.cpp:29
TransactionBatchImpl(types::SharedTxsCollectionType transactions)
Definition: transaction_batch_impl.cpp:20
std::string toString() const override
Pretty print the batch contents.
Definition: transaction_batch_impl.cpp:45
Definition: transaction_batch.hpp:22
std::vector< std::shared_ptr< Transaction > > SharedTxsCollectionType
Definition: transaction_sequence_common.hpp:27
const types::HashType & reducedHash() const override
Definition: transaction_batch_impl.cpp:34
bool hasAllSignatures() const override
Definition: transaction_batch_impl.cpp:38
TransactionBatchImpl & operator=(TransactionBatchImpl &&)=default
bool addSignature(size_t number_of_tx, types::SignedHexStringView signed_blob, types::PublicKeyHexStringView public_key) override
Definition: transaction_batch_impl.cpp:54
Definition: command_executor.hpp:13