hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
stateful_validator_common.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_STATEFUL_VALIDATOR_COMMON_HPP
7 #define IROHA_STATEFUL_VALIDATOR_COMMON_HPP
8 
9 #include <memory>
10 #include <utility>
11 #include <vector>
12 
13 #include <unordered_map>
14 
15 #include "cryptography/hash.hpp"
17 
18 namespace shared_model {
19  namespace interface {
20  class Proposal;
21  }
22 } // namespace shared_model
23 
24 namespace iroha {
25  namespace validation {
26 
30  struct CommandError {
32  std::string name;
33 
35  uint32_t error_code;
36 
38  std::string error_extra;
39 
42 
44  size_t index = 0;
45  };
46 
52  };
53 
55  using TransactionsErrors = std::vector<TransactionError>;
56 
58  // TODO [IR-1849] mboldyrev 27.10.2018: create a special class
59  // for VerifiedProposal which will include the rejected tx hashes
61  std::shared_ptr<const shared_model::interface::Proposal>
64  };
65 
66  } // namespace validation
67 } // namespace iroha
68 
69 #endif // IROHA_STATEFUL_VALIDATOR_COMMON_HPP
Definition: hash.hpp:18
std::string name
Name of the failed command.
Definition: stateful_validator_common.hpp:32
std::shared_ptr< const shared_model::interface::Proposal > verified_proposal
Definition: stateful_validator_common.hpp:62
std::vector< TransactionError > TransactionsErrors
Collection of transactions errors.
Definition: stateful_validator_common.hpp:55
TransactionsErrors rejected_transactions
Definition: stateful_validator_common.hpp:63
uint32_t error_code
Error code, with which the command failed.
Definition: stateful_validator_common.hpp:35
Definition: block_query.hpp:16
CommandError error
Definition: stateful_validator_common.hpp:51
shared_model::crypto::Hash tx_hash
Definition: stateful_validator_common.hpp:50
Definition: stateful_validator_common.hpp:30
std::string error_extra
Extra information about error for developers to be placed into the log.
Definition: stateful_validator_common.hpp:38
Type of verified proposal and errors appeared in the process.
Definition: stateful_validator_common.hpp:60
Definition: command_executor.hpp:12
Definition: stateful_validator_common.hpp:49
bool tx_passed_initial_validation
Shows, if transaction has passed initial validation.
Definition: stateful_validator_common.hpp:41