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, const consensus::Round &initial_round={2, kFirstRejectRound})
void onCollaborationOutcome (consensus::Round round) override
void onBatches (CollectionType batches) override
boost::optional< std::shared_ptr< const ProposalType > > onRequestProposal (consensus::Round round) override
- Public Member Functions inherited from iroha::ordering::transport::OdOsNotification
virtual ~OdOsNotification ()=default

Additional Inherited Members

- Public Types inherited from iroha::ordering::transport::OdOsNotification
using ProposalType = shared_model::interface::Proposal
using TransactionBatchType = std::shared_ptr< shared_model::interface::TransactionBatch >
using CollectionType = std::vector< TransactionBatchType >

Constructor & Destructor Documentation

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,
const consensus::Round initial_round = {2, kFirstRejectRound} 

Create on_demand ordering service with following options:

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
initial_round- first round of agreement. Default value is {2, kFirstRejectRound} since genesis block height is 1

Here is the call graph for this function:

Member Function Documentation

void OnDemandOrderingServiceImpl::onBatches ( CollectionType  batches)

Callback on receiving transactions

batches- vector of passed transaction batches

Implements iroha::ordering::transport::OdOsNotification.

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

Method which should be invoked on outcome of collaboration for round

round- proposal round which has started

Implements iroha::ordering::OnDemandOrderingService.

Here is the caller graph for this function:

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

Callback on request about proposal

round- number of collaboration round. Calculated as block_height + 1
proposal for requested round

Implements iroha::ordering::transport::OdOsNotification.

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