hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::TransactionResponse Class Referenceabstract

#include "tx_response.hpp"

Inheritance diagram for shared_model::interface::TransactionResponse:
Inheritance graph
Collaboration diagram for shared_model::interface::TransactionResponse:
Collaboration graph

Public Types

enum  PrioritiesComparisonResult { PrioritiesComparisonResult::kLess, PrioritiesComparisonResult::kEqual, PrioritiesComparisonResult::kGreater }
 
using ResponseVariantType = wrap< StatelessFailedTxResponse, StatelessValidTxResponse, StatefulFailedTxResponse, StatefulValidTxResponse, RejectedTxResponse, CommittedTxResponse, MstExpiredResponse, NotReceivedTxResponse, MstPendingResponse, EnoughSignaturesCollectedResponse >
 Type of variant, that handle all concrete tx responses in the system. More...
 
using TransactionHashType = interface::types::HashType
 Type of transaction hash. More...
 
using StatelessErrorOrFailedCommandNameType = std::string
 
using FailedCommandIndexType = size_t
 Type of command index, which failed validation. More...
 
using ErrorCodeType = uint32_t
 Type of command error code. More...
 
- Public Types inherited from shared_model::interface::ModelPrimitive< TransactionResponse >
using ModelType = TransactionResponse
 

Public Member Functions

virtual const TransactionHashTypetransactionHash () const =0
 
virtual const ResponseVariantTypeget () const =0
 
virtual const StatelessErrorOrFailedCommandNameTypestatelessErrorOrCommandName () const =0
 
virtual FailedCommandIndexType failedCommandIndex () const =0
 
virtual ErrorCodeType errorCode () const =0
 
PrioritiesComparisonResult comparePriorities (const ModelType &other) const noexcept
 
std::string toString () const override
 
bool operator== (const ModelType &rhs) const override
 
- Public Member Functions inherited from shared_model::interface::ModelPrimitive< TransactionResponse >
virtual bool operator!= (const ModelType &rhs) const
 
virtual ~ModelPrimitive ()=default
 

Protected Member Functions

virtual int priority () const noexcept=0
 

Detailed Description

TransactionResponse is a status of transaction in system

Member Typedef Documentation

Type of command error code.

Type of command index, which failed validation.

Type of stateless validation error or command name, which failed validation

Member Enumeration Documentation

Enumeration for holding result of priorities comparison

Enumerator
kLess 
kEqual 
kGreater 

Member Function Documentation

TransactionResponse::PrioritiesComparisonResult TransactionResponse::comparePriorities ( const ModelType other) const
noexcept

Compare priorities of two transaction responses

Parameters
otherresponse
Returns
enumeration result of that comparison
virtual ErrorCodeType shared_model::interface::TransactionResponse::errorCode ( ) const
pure virtual
Returns
error code, with which the command failed

Implemented in shared_model::proto::TransactionResponse.

Here is the caller graph for this function:

virtual FailedCommandIndexType shared_model::interface::TransactionResponse::failedCommandIndex ( ) const
pure virtual
Returns
index of failed command

Implemented in shared_model::proto::TransactionResponse.

Here is the caller graph for this function:

virtual const ResponseVariantType& shared_model::interface::TransactionResponse::get ( ) const
pure virtual
Returns
attached concrete tx response

Implemented in shared_model::proto::TransactionResponse.

Here is the caller graph for this function:

bool TransactionResponse::operator== ( const ModelType rhs) const
overridevirtual

Implements shared_model::interface::ModelPrimitive< TransactionResponse >.

Here is the call graph for this function:

virtual int shared_model::interface::TransactionResponse::priority ( ) const
protectedpure virtualnoexcept
Returns
priority of this transaction response; transaction response can only be replaced with one with higher priority
virtual const StatelessErrorOrFailedCommandNameType& shared_model::interface::TransactionResponse::statelessErrorOrCommandName ( ) const
pure virtual
Returns
name of the failed command, if present; empty string otherwise

Implemented in shared_model::proto::TransactionResponse.

Here is the caller graph for this function:

std::string TransactionResponse::toString ( ) const
overridevirtual

Make string developer representation of object

Returns
string with internal state of object

Reimplemented from shared_model::interface::ModelPrimitive< TransactionResponse >.

Here is the call graph for this function:

virtual const TransactionHashType& shared_model::interface::TransactionResponse::transactionHash ( ) const
pure virtual
Returns
hash of corresponding transaction

Implemented in shared_model::proto::TransactionResponse.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: