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

#include "on_demand_ordering_service.hpp"

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

Classes

struct  BatchPointerHasher
 

Public Types

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 >
 

Public Member Functions

virtual ~OnDemandOrderingService ()=default
 
virtual void onBatches (CollectionType batches)=0
 
virtual std::optional< std::shared_ptr< const ProposalType > > onRequestProposal (consensus::Round round)=0
 
virtual void onCollaborationOutcome (consensus::Round round)=0
 
virtual void onTxsCommitted (const HashesSetType &hashes)=0
 
virtual void forCachedBatches (std::function< void(const BatchesSetType &)> const &f) const =0
 
virtual bool isEmptyBatchesCache () const =0
 
virtual bool hasProposal (consensus::Round round) const =0
 
virtual void processReceivedProposal (CollectionType batches)=0
 

Detailed Description

Ordering Service aka OS which can share proposals by request

Member Typedef Documentation

◆ BatchesSetType

◆ CollectionType

Type of inserted collections

◆ HashesSetType

◆ ProposalType

◆ TransactionBatchType

Constructor & Destructor Documentation

◆ ~OnDemandOrderingService()

virtual iroha::ordering::OnDemandOrderingService::~OnDemandOrderingService ( )
virtualdefault

Member Function Documentation

◆ forCachedBatches()

virtual void iroha::ordering::OnDemandOrderingService::forCachedBatches ( std::function< void(const BatchesSetType &)> const &  f) const
pure virtual

Method to get betches under lock

Parameters
f- callback function

◆ hasProposal()

virtual bool iroha::ordering::OnDemandOrderingService::hasProposal ( consensus::Round  round) const
pure virtual

◆ isEmptyBatchesCache()

virtual bool iroha::ordering::OnDemandOrderingService::isEmptyBatchesCache ( ) const
pure virtual

◆ onBatches()

virtual void iroha::ordering::OnDemandOrderingService::onBatches ( CollectionType  batches)
pure virtual

Callback on receiving transactions

Parameters
batches- vector of passed transaction batches

Implemented in iroha::ordering::OnDemandOrderingServiceImpl.

◆ onCollaborationOutcome()

virtual void iroha::ordering::OnDemandOrderingService::onCollaborationOutcome ( consensus::Round  round)
pure virtual

Method which should be invoked on outcome of collaboration for round

Parameters
round- proposal round which has started

Implemented in iroha::ordering::OnDemandOrderingServiceImpl.

◆ onRequestProposal()

virtual std::optional<std::shared_ptr<const ProposalType> > iroha::ordering::OnDemandOrderingService::onRequestProposal ( consensus::Round  round)
pure virtual

◆ onTxsCommitted()

virtual void iroha::ordering::OnDemandOrderingService::onTxsCommitted ( const HashesSetType hashes)
pure virtual

Method to be invoked when transactions commited into ledger.

Parameters
hashes- txs list

Implemented in iroha::ordering::OnDemandOrderingServiceImpl.

◆ processReceivedProposal()

virtual void iroha::ordering::OnDemandOrderingService::processReceivedProposal ( CollectionType  batches)
pure virtual

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