hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::consensus::yac::ClusterOrdering Class Reference

#include "cluster_order.hpp"

Collaboration diagram for iroha::consensus::yac::ClusterOrdering:
Collaboration graph

Public Member Functions

const shared_model::interface::PeercurrentLeader ()
 
ClusterOrderingswitchToNext ()
 
bool hasNext () const
 
std::vector< std::shared_ptr< shared_model::interface::Peer > > getPeers () const
 
PeersNumberType getNumberOfPeers () const
 
virtual ~ClusterOrdering ()=default
 
 ClusterOrdering ()=delete
 

Static Public Member Functions

static boost::optional< ClusterOrderingcreate (const std::vector< std::shared_ptr< shared_model::interface::Peer >> &order)
 

Detailed Description

Class provide ordering on cluster for current round

Constructor & Destructor Documentation

virtual iroha::consensus::yac::ClusterOrdering::~ClusterOrdering ( )
virtualdefault
iroha::consensus::yac::ClusterOrdering::ClusterOrdering ( )
delete

Here is the caller graph for this function:

Member Function Documentation

boost::optional< ClusterOrdering > iroha::consensus::yac::ClusterOrdering::create ( const std::vector< std::shared_ptr< shared_model::interface::Peer >> &  order)
static

Creates cluster ordering from the vector of peers

Parameters
ordervector of peers
Returns
false if vector is empty, true otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

const shared_model::interface::Peer & iroha::consensus::yac::ClusterOrdering::currentLeader ( )

Provide current leader peer

Here is the caller graph for this function:

size_t iroha::consensus::yac::ClusterOrdering::getNumberOfPeers ( ) const

Here is the caller graph for this function:

std::vector< std::shared_ptr< shared_model::interface::Peer > > iroha::consensus::yac::ClusterOrdering::getPeers ( ) const

Here is the caller graph for this function:

bool iroha::consensus::yac::ClusterOrdering::hasNext ( ) const
Returns
true if current leader not last peer in order

Here is the caller graph for this function:

ClusterOrdering & iroha::consensus::yac::ClusterOrdering::switchToNext ( )

Switch to next peer as leader

Returns
this

Here is the caller graph for this function:


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