hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
transactions_collection_validator.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_TRANSACTIONS_COLLECTION_VALIDATOR_HPP
7 #define IROHA_TRANSACTIONS_COLLECTION_VALIDATOR_HPP
8 
11 #include "validators/answer.hpp"
12 
13 namespace shared_model {
14  namespace validation {
15 
20  template <typename TransactionValidator, bool CollectionCanBeEmpty = false>
22  protected:
24 
25  private:
26  template <typename Validator>
27  Answer validateImpl(
29  &transactions,
30  Validator &&validator) const;
31 
32  public:
34  const TransactionValidator &transactions_validator =
36 
37  // TODO: IR-1505, igor-egorov, 2018-07-05 Remove method below when
38  // proposal and block will return collection of shared transactions
45  &transactions) const;
46 
48  const interface::types::SharedTxsCollectionType &transactions) const;
49 
51  &transactions,
52  interface::types::TimestampType current_timestamp) const;
53 
56  interface::types::TimestampType current_timestamp) const;
57 
59  };
60 
61  } // namespace validation
62 } // namespace shared_model
63 
64 #endif // IROHA_TRANSACTIONS_COLLECTION_VALIDATOR_HPP
boost::any_range< Transaction, boost::forward_traversal_tag, const Transaction & > TransactionsForwardCollectionType
Definition: transaction_sequence_common.hpp:25
Answer validate(const interface::types::TransactionsForwardCollectionType &transactions) const
Definition: transactions_collection_validator.cpp:81
TransactionValidator transaction_validator_
Definition: transactions_collection_validator.hpp:23
const TransactionValidator & getTransactionValidator() const
Definition: transactions_collection_validator.cpp:120
Definition: transaction_validator.hpp:241
Definition: command_executor.hpp:12
Definition: answer.hpp:28
std::vector< std::shared_ptr< Transaction >> SharedTxsCollectionType
Definition: transaction_sequence_common.hpp:27
Definition: transactions_collection_validator.hpp:21
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:61
TransactionsCollectionValidator(const TransactionValidator &transactions_validator=TransactionValidator())
Definition: transactions_collection_validator.cpp:27