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  protected:
47  TransactionResponse *clone() const override;
48 
49  private:
50  struct Impl;
51  std::unique_ptr<Impl> impl_;
52 
53  int priority() const noexcept override;
54  };
55  } // namespace proto
56 } // namespace shared_model
57 
58 #endif // IROHA_PROTO_TX_RESPONSE_HPP
ErrorCodeType errorCode() const override
Definition: proto_tx_response.cpp:100
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
Definition: peer.hpp:48
const TransportType & getTransport() const
Definition: proto_tx_response.cpp:125
iroha::protocol::ToriiResponse TransportType
Definition: proto_tx_response.hpp:20
Definition: proto_tx_response.cpp:38
const ResponseVariantType & get() const override
Definition: proto_tx_response.cpp:85
Definition: range_types.hpp:19
const StatelessErrorOrFailedCommandNameType & statelessErrorOrCommandName() const override
Definition: proto_tx_response.cpp:91
Definition: proto_tx_response.hpp:18
FailedCommandIndexType failedCommandIndex() const override
Definition: proto_tx_response.cpp:96
Definition: tx_response.hpp:31
TransactionResponse * clone() const override
Definition: proto_tx_response.cpp:129
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 interface::types::HashType & transactionHash() const override
Definition: proto_tx_response.cpp:80
Definition: command_executor.hpp:12
TransactionResponse(const TransactionResponse &r)
Definition: proto_tx_response.cpp:66