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

#include "yac.hpp"

Inheritance diagram for iroha::consensus::yac::Yac:
Inheritance graph
Collaboration diagram for iroha::consensus::yac::Yac:
Collaboration graph

Public Member Functions

 Yac (YacVoteStorage vote_storage, std::shared_ptr< YacNetwork > network, std::shared_ptr< YacCryptoProvider > crypto, std::shared_ptr< Timer > timer, ClusterOrdering order, Round round, rxcpp::observe_on_one_worker worker, logger::LoggerPtr log)
 
 ~Yac () override
 
void vote (YacHash hash, ClusterOrdering order, boost::optional< ClusterOrdering > alternative_order=boost::none) override
 
rxcpp::observable< AnsweronOutcome () override
 
void onState (std::vector< VoteMessage > state) override
 
void stop () override
 Prevent any new outgoing network activity. Be passive. More...
 
- Public Member Functions inherited from iroha::consensus::yac::HashGate
virtual ~HashGate ()=default
 
- Public Member Functions inherited from iroha::consensus::yac::YacNetworkNotifications
virtual ~YacNetworkNotifications ()=default
 

Static Public Member Functions

static std::shared_ptr< Yaccreate (YacVoteStorage vote_storage, std::shared_ptr< YacNetwork > network, std::shared_ptr< YacCryptoProvider > crypto, std::shared_ptr< Timer > timer, ClusterOrdering order, Round round, rxcpp::observe_on_one_worker worker, logger::LoggerPtr log)
 

Constructor & Destructor Documentation

◆ Yac()

iroha::consensus::yac::Yac::Yac ( YacVoteStorage  vote_storage,
std::shared_ptr< YacNetwork network,
std::shared_ptr< YacCryptoProvider crypto,
std::shared_ptr< Timer timer,
ClusterOrdering  order,
Round  round,
rxcpp::observe_on_one_worker  worker,
logger::LoggerPtr  log 
)

◆ ~Yac()

iroha::consensus::yac::Yac::~Yac ( )
override

Member Function Documentation

◆ create()

std::shared_ptr< Yac > iroha::consensus::yac::Yac::create ( YacVoteStorage  vote_storage,
std::shared_ptr< YacNetwork network,
std::shared_ptr< YacCryptoProvider crypto,
std::shared_ptr< Timer timer,
ClusterOrdering  order,
Round  round,
rxcpp::observe_on_one_worker  worker,
logger::LoggerPtr  log 
)
static

Method for creating Yac consensus object

Parameters
delayfor timer in milliseconds

◆ onOutcome()

rxcpp::observable< Answer > iroha::consensus::yac::Yac::onOutcome ( )
overridevirtual

Observable with consensus outcomes - commits and rejects - in network

Returns
observable for subscription

Implements iroha::consensus::yac::HashGate.

◆ onState()

void iroha::consensus::yac::Yac::onState ( std::vector< VoteMessage state)
overridevirtual

Callback on receiving collection of votes

Parameters
state- provided message

Implements iroha::consensus::yac::YacNetworkNotifications.

Here is the call graph for this function:

◆ stop()

void iroha::consensus::yac::Yac::stop ( )
overridevirtual

Prevent any new outgoing network activity. Be passive.

Implements iroha::consensus::yac::HashGate.

◆ vote()

void iroha::consensus::yac::Yac::vote ( YacHash  hash,
ClusterOrdering  order,
boost::optional< ClusterOrdering alternative_order = boost::none 
)
overridevirtual

Proposal new hash in network

Parameters
hash- hash for voting
order- peer ordering for round in hash
alternative_order- peer order

Implements iroha::consensus::yac::HashGate.

Here is the call graph for this function:
Here is the caller graph for this function:

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