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

#include "on_demand_ordering_gate.hpp"

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

Classes

struct  BlockEvent
 
struct  EmptyEvent
 

Public Types

using BlockRoundEventType = boost::variant< BlockEvent, EmptyEvent >
 

Public Member Functions

 OnDemandOrderingGate (std::shared_ptr< OnDemandOrderingService > ordering_service, std::shared_ptr< transport::OdOsNotification > network_client, rxcpp::observable< BlockRoundEventType > events, std::shared_ptr< cache::OrderingGateCache > cache, std::shared_ptr< shared_model::interface::UnsafeProposalFactory > factory, std::shared_ptr< ametsuchi::TxPresenceCache > tx_cache, consensus::Round initial_round, logger::Logger log=logger::log("OnDemandOrderingGate"))
 
 ~OnDemandOrderingGate () override
 
void propagateBatch (std::shared_ptr< shared_model::interface::TransactionBatch > batch) override
 
rxcpp::observable< network::OrderingEventonProposal () override
 
void setPcs (const iroha::network::PeerCommunicationService &pcs) override
 
- Public Member Functions inherited from iroha::network::OrderingGate
virtual ~OrderingGate ()=default
 

Detailed Description

Ordering gate which requests proposals from the ordering service votes for proposals, and passes committed proposals to the pipeline

Member Typedef Documentation

Constructor & Destructor Documentation

OnDemandOrderingGate::OnDemandOrderingGate ( std::shared_ptr< OnDemandOrderingService ordering_service,
std::shared_ptr< transport::OdOsNotification network_client,
rxcpp::observable< BlockRoundEventType events,
std::shared_ptr< cache::OrderingGateCache cache,
std::shared_ptr< shared_model::interface::UnsafeProposalFactory factory,
std::shared_ptr< ametsuchi::TxPresenceCache tx_cache,
consensus::Round  initial_round,
logger::Logger  log = logger::log("OnDemandOrderingGate") 
)
OnDemandOrderingGate::~OnDemandOrderingGate ( )
override

Member Function Documentation

rxcpp::observable< network::OrderingEvent > OnDemandOrderingGate::onProposal ( )
overridevirtual

Return observable of all proposals in the consensus

Returns
observable with notifications

Implements iroha::network::OrderingGate.

void OnDemandOrderingGate::propagateBatch ( std::shared_ptr< shared_model::interface::TransactionBatch batch)
overridevirtual

Propagate a transaction batch for further processing

Parameters
batch

Implements iroha::network::OrderingGate.

void OnDemandOrderingGate::setPcs ( const iroha::network::PeerCommunicationService pcs)
overridevirtual

Set peer communication service for commit notification

Parameters
pcs- const reference for PeerCommunicationService design notes: pcs passed by const reference because of cyclic linking between OG and PCS in the implementation. Same reasons to move the pcs dependency not in ctor but make the setter method.

Implements iroha::network::OrderingGate.

Here is the call graph for this function:


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