hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proposal_validator.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PROPOSAL_VALIDATOR_HPP
7 #define IROHA_PROPOSAL_VALIDATOR_HPP
8 
9 #include <boost/format.hpp>
10 #include <regex>
11 #include "datetime/time.hpp"
15 #include "validators/answer.hpp"
17 
18 // TODO 22/01/2018 x3medima17: write stateless validator IR-836
19 
20 namespace shared_model {
21  namespace validation {
22 
26  template <typename FieldValidator, typename TransactionsCollectionValidator>
28  : public ContainerValidator<interface::Proposal,
29  FieldValidator,
30  TransactionsCollectionValidator>,
31  public AbstractValidator<interface::Proposal> {
32  public:
33  using ContainerValidator<
42  Answer validate(const interface::Proposal &prop) const {
43  return ContainerValidator<
44  interface::Proposal,
45  FieldValidator,
47  }
48  };
49 
50  } // namespace validation
51 } // namespace shared_model
52 
53 #endif // IROHA_PROPOSAL_VALIDATOR_HPP
Definition: container_validator.hpp:25
Definition: abstract_validator.hpp:16
Definition: proposal.hpp:17
ContainerValidator(FieldValidator field_validator, TransactionsCollectionValidator transactions_collection_validator)
Definition: container_validator.hpp:38
Definition: proposal_validator.hpp:27
Definition: field_validator.hpp:35
Answer validate(const interface::Proposal &prop) const
Definition: proposal_validator.hpp:42
Definition: command_executor.hpp:12
Definition: answer.hpp:28
Definition: transactions_collection_validator.hpp:22