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

#include "pending_txs_storage.hpp"

Inheritance diagram for iroha::PendingTransactionStorage:
Inheritance graph
Collaboration diagram for iroha::PendingTransactionStorage:
Collaboration graph

Classes

struct  Response
 

Public Types

enum  ErrorCode { kNotFound }
 

Public Member Functions

virtual shared_model::interface::types::SharedTxsCollectionType getPendingTransactions (const shared_model::interface::types::AccountIdType &account_id) const =0
 
virtual void insertPresenceCache (std::shared_ptr< ametsuchi::TxPresenceCache > &cache)=0
 
virtual expected::Result< Response, ErrorCodegetPendingTransactions (const shared_model::interface::types::AccountIdType &account_id, const shared_model::interface::types::TransactionsNumberType page_size, const std::optional< shared_model::interface::types::HashType > &first_tx_hash) const =0
 
virtual ~PendingTransactionStorage ()=default
 

Detailed Description

Interface of storage for not fully signed transactions.

Member Enumeration Documentation

◆ ErrorCode

Possible error codes the storage may return instead of pending transactions list

Enumerator
kNotFound 

Constructor & Destructor Documentation

◆ ~PendingTransactionStorage()

virtual iroha::PendingTransactionStorage::~PendingTransactionStorage ( )
virtualdefault
Here is the caller graph for this function:

Member Function Documentation

◆ getPendingTransactions() [1/2]

virtual shared_model::interface::types:: SharedTxsCollectionType iroha::PendingTransactionStorage::getPendingTransactions ( const shared_model::interface::types::AccountIdType account_id) const
pure virtual

DEPRECATED (Replaced by the following method with an extended interface) Going to be removed with the upcoming major release.

Get all the pending transactions associated with request originator

Parameters
account_id- query creator
Returns
collection of interface::Transaction objects

Implemented in iroha::PendingTransactionStorageImpl.

Here is the caller graph for this function:

◆ getPendingTransactions() [2/2]

virtual expected::Result<Response, ErrorCode> iroha::PendingTransactionStorage::getPendingTransactions ( const shared_model::interface::types::AccountIdType account_id,
const shared_model::interface::types::TransactionsNumberType  page_size,
const std::optional< shared_model::interface::types::HashType > &  first_tx_hash 
) const
pure virtual

Fetch pending transactions associated with request originator

Parameters
account_id- query creator
page_size- requested page size
first_tx_hash- an optional hash of the first transaction in the batch that will be the starting point of returned transactions sequence
Returns
- Response message when query succeeded (next_batch_info might not be set when the end is reached). One of ErrorCode in case of error.

◆ insertPresenceCache()

virtual void iroha::PendingTransactionStorage::insertPresenceCache ( std::shared_ptr< ametsuchi::TxPresenceCache > &  cache)
pure virtual

Stores TxPresenceCache ref, for checks.

Parameters
cache- ref to the stored object.

Implemented in iroha::PendingTransactionStorageImpl.

Here is the caller graph for this function:

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