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

#include "yac_gate.hpp"

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

Public Member Functions

virtual void vote (YacHash hash, ClusterOrdering order, std::optional< ClusterOrdering > alternative_order=std::nullopt)=0
 
virtual std::optional< AnswerprocessRoundSwitch (consensus::Round const &round, shared_model::interface::types::PeerList const &peers)=0
 
virtual void stop ()=0
 Prevent any new outgoing network activity. Be passive. More...
 
virtual ~HashGate ()=default
 

Detailed Description

Provide gate for ya consensus

Constructor & Destructor Documentation

◆ ~HashGate()

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

Member Function Documentation

◆ processRoundSwitch()

virtual std::optional<Answer> iroha::consensus::yac::HashGate::processRoundSwitch ( consensus::Round const &  round,
shared_model::interface::types::PeerList const &  peers 
)
pure virtual

Update current state with the new round and peer list, possibly pruning the old state. Process states from future if available, and return the result

Parameters
round- new round
peers- new peer list
Returns
answer if storage already contains required votes

Implemented in iroha::consensus::yac::Yac.

◆ stop()

virtual void iroha::consensus::yac::HashGate::stop ( )
pure virtual

Prevent any new outgoing network activity. Be passive.

Implemented in iroha::consensus::yac::Yac.

◆ vote()

virtual void iroha::consensus::yac::HashGate::vote ( YacHash  hash,
ClusterOrdering  order,
std::optional< ClusterOrdering alternative_order = std::nullopt 
)
pure virtual

Proposal new hash in network

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

Implemented in iroha::consensus::yac::Yac.


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