hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_tx_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PROTO_TX_RESPONSE_HPP
7 #define IROHA_PROTO_TX_RESPONSE_HPP
8 
10 
11 #include "endpoint.pb.h"
12 
13 namespace shared_model {
14  namespace proto {
19  public:
20  using TransportType = iroha::protocol::ToriiResponse;
21 
24 
25  explicit TransactionResponse(const TransportType &ref);
26  explicit TransactionResponse(TransportType &&ref);
27 
28  ~TransactionResponse() override;
29 
30  const interface::types::HashType &transactionHash() const override;
31 
35  const ResponseVariantType &get() const override;
36 
38  const override;
39 
41 
42  ErrorCodeType errorCode() const override;
43 
44  const TransportType &getTransport() const;
45 
46  private:
47  struct Impl;
48  std::unique_ptr<Impl> impl_;
49 
50  int priority() const noexcept override;
51  };
52  } // namespace proto
53 } // namespace shared_model
54 
55 #endif // IROHA_PROTO_TX_RESPONSE_HPP
ErrorCodeType errorCode() const override
Definition: proto_tx_response.cpp:111
uint32_t ErrorCodeType
Type of command error code.
Definition: tx_response.hpp:87
Definition: hash.hpp:18
std::string StatelessErrorOrFailedCommandNameType
Definition: tx_response.hpp:72
size_t FailedCommandIndexType
Type of command index, which failed validation.
Definition: tx_response.hpp:80
iroha::protocol::ToriiResponse TransportType
Definition: proto_tx_response.hpp:20
Definition: proto_tx_response.cpp:41
const StatelessErrorOrFailedCommandNameType & statelessErrorOrCommandName() const override
Definition: proto_tx_response.cpp:102
Definition: proto_tx_response.hpp:18
FailedCommandIndexType failedCommandIndex() const override
Definition: proto_tx_response.cpp:107
Definition: tx_response.hpp:31
wrap< StatelessFailedTxResponse, StatelessValidTxResponse, StatefulFailedTxResponse, StatefulValidTxResponse, RejectedTxResponse, CommittedTxResponse, MstExpiredResponse, NotReceivedTxResponse, MstPendingResponse, EnoughSignaturesCollectedResponse > ResponseVariantType
Type of variant, that handle all concrete tx responses in the system.
Definition: tx_response.hpp:55
const TransportType & getTransport() const
Definition: proto_tx_response.cpp:135
const interface::types::HashType & transactionHash() const override
Definition: proto_tx_response.cpp:91
Definition: command_executor.hpp:12
TransactionResponse(const TransactionResponse &r)
Definition: proto_tx_response.cpp:77