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
 
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

◆ ~ClusterOrdering()

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

◆ ClusterOrdering()

iroha::consensus::yac::ClusterOrdering::ClusterOrdering ( )
delete
Here is the caller graph for this function:

Member Function Documentation

◆ create()

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:

◆ currentLeader()

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

Provide current leader peer

◆ getNumberOfPeers()

size_t iroha::consensus::yac::ClusterOrdering::getNumberOfPeers ( ) const
Here is the caller graph for this function:

◆ getPeers()

const std::vector< std::shared_ptr< shared_model::interface::Peer > > & iroha::consensus::yac::ClusterOrdering::getPeers ( ) const
Here is the caller graph for this function:

◆ hasNext()

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

◆ switchToNext()

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

Switch to next peer as leader

Returns
this

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