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

#include "on_demand_ordering_service_impl.hpp"

Inheritance diagram for iroha::ordering::OnDemandOrderingServiceImpl:
Inheritance graph
Collaboration diagram for iroha::ordering::OnDemandOrderingServiceImpl:
Collaboration graph

Public Member Functions

 OnDemandOrderingServiceImpl (size_t transaction_limit, std::shared_ptr< shared_model::interface::UnsafeProposalFactory > proposal_factory, std::shared_ptr< ametsuchi::TxPresenceCache > tx_cache, logger::LoggerPtr log, size_t number_of_proposals=3)
 
void onBatches (CollectionType batches) override
 
std::optional< std::shared_ptr< const ProposalType > > onRequestProposal (consensus::Round round) override
 
void onCollaborationOutcome (consensus::Round round) override
 
void onTxsCommitted (const HashesSetType &hashes) override
 
void processReceivedProposal (CollectionType batches) override
 
- Public Member Functions inherited from iroha::ordering::OnDemandOrderingService
virtual ~OnDemandOrderingService ()=default
 

Additional Inherited Members

- Public Types inherited from iroha::ordering::OnDemandOrderingService
using ProposalType = shared_model::interface::Proposal
 
using BatchesSetType = std::unordered_set< std::shared_ptr< shared_model::interface::TransactionBatch >, BatchPointerHasher, shared_model::interface::BatchHashEquality >
 
using TransactionBatchType = std::shared_ptr< shared_model::interface::TransactionBatch >
 
using CollectionType = std::vector< TransactionBatchType >
 
using HashesSetType = std::unordered_set< shared_model::crypto::Hash, shared_model::crypto::Hash::Hasher >
 

Constructor & Destructor Documentation

◆ OnDemandOrderingServiceImpl()

OnDemandOrderingServiceImpl::OnDemandOrderingServiceImpl ( size_t  transaction_limit,
std::shared_ptr< shared_model::interface::UnsafeProposalFactory proposal_factory,
std::shared_ptr< ametsuchi::TxPresenceCache tx_cache,
logger::LoggerPtr  log,
size_t  number_of_proposals = 3 
)

Create on_demand ordering service with following options:

Parameters
transaction_limit- number of maximum transactions in one proposal
proposal_factory- used to generate proposals
tx_cache- cache of transactions
logto print progress
number_of_proposals- number of stored proposals, older will be removed. Default value is 3

Member Function Documentation

◆ onBatches()

void OnDemandOrderingServiceImpl::onBatches ( CollectionType  batches)
overridevirtual

Callback on receiving transactions

Parameters
batches- vector of passed transaction batches

Implements iroha::ordering::OnDemandOrderingService.

Here is the call graph for this function:

◆ onCollaborationOutcome()

void OnDemandOrderingServiceImpl::onCollaborationOutcome ( consensus::Round  round)
overridevirtual

Method which should be invoked on outcome of collaboration for round

Parameters
round- proposal round which has started

Implements iroha::ordering::OnDemandOrderingService.

◆ onRequestProposal()

std::optional< std::shared_ptr< const OnDemandOrderingServiceImpl::ProposalType > > OnDemandOrderingServiceImpl::onRequestProposal ( consensus::Round  round)
overridevirtual

Implements iroha::ordering::OnDemandOrderingService.

Here is the call graph for this function:

◆ onTxsCommitted()

void iroha::ordering::OnDemandOrderingServiceImpl::onTxsCommitted ( const HashesSetType hashes)
inlineoverridevirtual

Method to be invoked when transactions commited into ledger.

Parameters
hashes- txs list

Implements iroha::ordering::OnDemandOrderingService.

◆ processReceivedProposal()

void OnDemandOrderingServiceImpl::processReceivedProposal ( CollectionType  batches)
overridevirtual

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