hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transaction_batch_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TRANSACTION_BATCH_FACTORY_HPP
7 #define IROHA_TRANSACTION_BATCH_FACTORY_HPP
8 
9 #include <memory>
10 
11 #include "common/result.hpp"
13 
14 namespace shared_model {
15  namespace interface {
16 
17  class TransactionBatch;
18 
24  public:
25  virtual ~TransactionBatchFactory() = default;
26 
27  template <typename BatchType>
28  using FactoryResult = iroha::expected::Result<BatchType, std::string>;
29 
37  virtual createTransactionBatch(
38  const types::SharedTxsCollectionType &transactions) const = 0;
39 
48  virtual createTransactionBatch(
49  std::shared_ptr<Transaction> transaction) const = 0;
50  };
51 
52  } // namespace interface
53 } // namespace shared_model
54 
55 #endif // IROHA_TRANSACTION_BATCH_FACTORY_HPP
virtual FactoryResult< std::unique_ptr< TransactionBatch > > createTransactionBatch(const types::SharedTxsCollectionType &transactions) const =0
iroha::expected::Result< BatchType, std::string > FactoryResult
Definition: transaction_batch_factory.hpp:28
Definition: transaction_batch_factory.hpp:23
Definition: command_executor.hpp:12
std::vector< std::shared_ptr< Transaction >> SharedTxsCollectionType
Definition: transaction_sequence_common.hpp:27