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

#include "on_demand_ordering_init.hpp"

Collaboration diagram for iroha::ordering::OnDemandOrderingInit:
Collaboration graph

Public Types

using TransportFactoryType = shared_model::interface::AbstractTransportFactory< shared_model::interface::Proposal, iroha::protocol::Proposal >
 

Public Member Functions

 OnDemandOrderingInit (logger::LoggerPtr log)
 
std::shared_ptr< network::OrderingGateinitOrderingGate (size_t max_number_of_transactions, std::chrono::milliseconds delay, std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >> transaction_factory, std::shared_ptr< shared_model::interface::TransactionBatchParser > batch_parser, std::shared_ptr< shared_model::interface::TransactionBatchFactory > transaction_batch_factory, std::shared_ptr< shared_model::interface::UnsafeProposalFactory > proposal_factory, std::shared_ptr< TransportFactoryType > proposal_transport_factory, std::shared_ptr< ametsuchi::TxPresenceCache > tx_cache, logger::LoggerManagerTreePtr ordering_log_manager, std::shared_ptr< iroha::network::GenericClientFactory > client_factory, std::chrono::milliseconds proposal_creation_timeout)
 
iroha::ordering::RoundSwitch processSynchronizationEvent (synchronizer::SynchronizationEvent event)
 
void processRoundSwitch (iroha::ordering::RoundSwitch const &event)
 
void processCommittedBlock (std::shared_ptr< shared_model::interface::Block const > block)
 
void subscribe (std::function< void(network::OrderingEvent const &)> callback)
 

Public Attributes

std::shared_ptr< grpc::Service > service
 gRPC service for ordering service More...
 

Detailed Description

Encapsulates initialization logic for on-demand ordering gate and service

Member Typedef Documentation

◆ TransportFactoryType

Constructor & Destructor Documentation

◆ OnDemandOrderingInit()

OnDemandOrderingInit::OnDemandOrderingInit ( logger::LoggerPtr  log)

Constructor.

Parameters
log- the logger to use for internal messages.

Member Function Documentation

◆ initOrderingGate()

std::shared_ptr< iroha::network::OrderingGate > OnDemandOrderingInit::initOrderingGate ( size_t  max_number_of_transactions,
std::chrono::milliseconds  delay,
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >>  transaction_factory,
std::shared_ptr< shared_model::interface::TransactionBatchParser batch_parser,
std::shared_ptr< shared_model::interface::TransactionBatchFactory transaction_batch_factory,
std::shared_ptr< shared_model::interface::UnsafeProposalFactory proposal_factory,
std::shared_ptr< TransportFactoryType proposal_transport_factory,
std::shared_ptr< ametsuchi::TxPresenceCache tx_cache,
logger::LoggerManagerTreePtr  ordering_log_manager,
std::shared_ptr< iroha::network::GenericClientFactory client_factory,
std::chrono::milliseconds  proposal_creation_timeout 
)

Initializes on-demand ordering gate and ordering sevice components

Parameters
max_number_of_transactionsmaximum number of transactions in a proposal
delaytimeout for ordering service response on proposal request
transaction_factorytransport factory for transactions required by ordering service network endpoint
batch_parsertransaction batch parser required by ordering service network endpoint
transaction_batch_factorytransport factory for transaction batch candidates produced by parser
proposal_factoryfactory required by ordering service to produce proposals
client_factory- a factory of client stubs
Returns
initialized ordering gate

◆ processCommittedBlock()

void OnDemandOrderingInit::processCommittedBlock ( std::shared_ptr< shared_model::interface::Block const >  block)
Here is the call graph for this function:

◆ processRoundSwitch()

void OnDemandOrderingInit::processRoundSwitch ( iroha::ordering::RoundSwitch const &  event)

◆ processSynchronizationEvent()

iroha::ordering::RoundSwitch OnDemandOrderingInit::processSynchronizationEvent ( synchronizer::SynchronizationEvent  event)

permutations for peers lists

Here is the call graph for this function:

◆ subscribe()

void OnDemandOrderingInit::subscribe ( std::function< void(network::OrderingEvent const &)>  callback)
Here is the call graph for this function:

Member Data Documentation

◆ service

std::shared_ptr<grpc::Service> iroha::ordering::OnDemandOrderingInit::service

gRPC service for ordering service


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