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, size_t number_of_proposals=3, const consensus::Round &initial_round={2, kFirstRejectRound}, logger::Logger log=logger::log("OnDemandOrderingServiceImpl"))
 
void onCollaborationOutcome (consensus::Round round) override
 
void onBatches (consensus::Round, CollectionType batches) override
 
boost::optional< ProposalTypeonRequestProposal (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 = std::unique_ptr< 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,
size_t  number_of_proposals = 3,
const consensus::Round initial_round = {2, kFirstRejectRound},
logger::Logger  log = logger::log("OnDemandOrderingServiceImpl") 
)

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
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
logto print progress

Here is the call graph for this function:

Member Function Documentation

void OnDemandOrderingServiceImpl::onBatches ( consensus::Round  round,
CollectionType  batches 
)
overridevirtual

Callback on receiving transactions

Parameters
round- expected proposal round
batches- vector of passed transaction batches

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

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.

Here is the caller graph for this function:

boost::optional< OnDemandOrderingServiceImpl::ProposalType > OnDemandOrderingServiceImpl::onRequestProposal ( consensus::Round  round)
overridevirtual

Callback on request about proposal

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

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

Here is the call graph for this function:


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