hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::PendingTransactionStorageImpl Class Reference

#include "pending_txs_storage_impl.hpp"

Inheritance diagram for iroha::PendingTransactionStorageImpl:
Inheritance graph
Collaboration diagram for iroha::PendingTransactionStorageImpl:
Collaboration graph

Public Types

using AccountIdType = shared_model::interface::types::AccountIdType
 
using HashType = shared_model::interface::types::HashType
 
using SharedTxsCollectionType = shared_model::interface::types::SharedTxsCollectionType
 
using TransactionBatch = shared_model::interface::TransactionBatch
 
using SharedState = std::shared_ptr< MstState >
 
using SharedBatch = std::shared_ptr< TransactionBatch >
 
using StateObservable = rxcpp::observable< SharedState >
 
using BatchObservable = rxcpp::observable< SharedBatch >
 
using PreparedTransactionDescriptor = std::pair< AccountIdType, HashType >
 
using PreparedTransactionsObservable = rxcpp::observable< PreparedTransactionDescriptor >
 
using FinalizedTransactionsObservable = rxcpp::observable< HashType >
 
- Public Types inherited from iroha::PendingTransactionStorage
enum  ErrorCode { kNotFound }
 

Public Member Functions

 PendingTransactionStorageImpl (PendingTransactionStorageImpl::private_tag)
 
 PendingTransactionStorageImpl (PendingTransactionStorageImpl const &)=delete
 
PendingTransactionStorageImploperator= (PendingTransactionStorageImpl const &)=delete
 
SharedTxsCollectionType getPendingTransactions (const AccountIdType &account_id) const override
 
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 override
 
void insertPresenceCache (std::shared_ptr< ametsuchi::TxPresenceCache > &cache) override
 
- Public Member Functions inherited from iroha::PendingTransactionStorage
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
 

Static Public Member Functions

static std::shared_ptr< PendingTransactionStorageImplcreate (StateObservable updated_batches, BatchObservable prepared_batch, BatchObservable expired_batch, PreparedTransactionsObservable prepared_txs, FinalizedTransactionsObservable finalized_txs)
 

Member Typedef Documentation

◆ AccountIdType

◆ BatchObservable

◆ FinalizedTransactionsObservable

◆ HashType

◆ PreparedTransactionDescriptor

◆ PreparedTransactionsObservable

◆ SharedBatch

◆ SharedState

◆ SharedTxsCollectionType

◆ StateObservable

◆ TransactionBatch

Constructor & Destructor Documentation

◆ PendingTransactionStorageImpl() [1/2]

iroha::PendingTransactionStorageImpl::PendingTransactionStorageImpl ( PendingTransactionStorageImpl::private_tag  )

◆ PendingTransactionStorageImpl() [2/2]

iroha::PendingTransactionStorageImpl::PendingTransactionStorageImpl ( PendingTransactionStorageImpl const &  )
delete

Member Function Documentation

◆ create()

std::shared_ptr< PendingTransactionStorageImpl > iroha::PendingTransactionStorageImpl::create ( StateObservable  updated_batches,
BatchObservable  prepared_batch,
BatchObservable  expired_batch,
PreparedTransactionsObservable  prepared_txs,
FinalizedTransactionsObservable  finalized_txs 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPendingTransactions() [1/2]

PendingTransactionStorageImpl::SharedTxsCollectionType iroha::PendingTransactionStorageImpl::getPendingTransactions ( const AccountIdType account_id) const
overridevirtual

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

Implements iroha::PendingTransactionStorage.

◆ getPendingTransactions() [2/2]

expected::Result< PendingTransactionStorage::Response, PendingTransactionStorage::ErrorCode > iroha::PendingTransactionStorageImpl::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
override
Here is the call graph for this function:

◆ insertPresenceCache()

void iroha::PendingTransactionStorageImpl::insertPresenceCache ( std::shared_ptr< ametsuchi::TxPresenceCache > &  cache)
overridevirtual

Stores TxPresenceCache ref, for checks.

Parameters
cache- ref to the stored object.

Implements iroha::PendingTransactionStorage.

Here is the call graph for this function:

◆ operator=()

PendingTransactionStorageImpl& iroha::PendingTransactionStorageImpl::operator= ( PendingTransactionStorageImpl const &  )
delete

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