hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transaction_sequence_builder.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TRANSACTION_SEQUENCE_BUILDER_HPP
7 #define IROHA_TRANSACTION_SEQUENCE_BUILDER_HPP
8 
12 
13 namespace shared_model {
14  namespace proto {
15 
20  template <typename SV>
21  class DEPRECATED TransportBuilder<interface::TransactionSequence, SV> {
22  public:
24  SV stateless_validator = SV())
25  : stateless_validator_(stateless_validator) {}
26 
33  template <class T>
34  iroha::expected::Result<interface::TransactionSequence, std::string>
35  build(const T &transport) {
36  const auto &txs = transport.transactions();
37  std::vector<std::shared_ptr<interface::Transaction>> shm_txs;
38  std::transform(txs.begin(),
39  txs.end(),
40  std::back_inserter(shm_txs),
41  [](const iroha::protocol::Transaction &tx) {
42  return std::make_shared<Transaction>(tx);
43  });
45  shm_txs, stateless_validator_);
46  }
47 
48  private:
49  SV stateless_validator_;
50  };
51  } // namespace proto
52 } // namespace shared_model
53 #endif // IROHA_TRANSACTION_SEQUENCE_BUILDER_HPP
static iroha::expected::Result< TransactionSequence, std::string > createTransactionSequence(const types::SharedTxsCollectionType &transactions, const validation::TransactionsCollectionValidator< TransactionValidator > &validator, const FieldValidator &field_validator=FieldValidator())
Definition: transaction_sequence_factory.cpp:24
Definition: transport_builder.hpp:21
iroha::expected::Result< interface::TransactionSequence, std::string > build(const T &transport)
Definition: transaction_sequence_builder.hpp:35
Definition: command_executor.hpp:12
#define DEPRECATED
Definition: swig_keyword_hider.hpp:15