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

An implementation of BFT supermajority checker. More...

#include "supermajority_checker_bft.hpp"

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

Public Member Functions

bool hasSupermajority (PeersNumberType current, PeersNumberType all) const override
 
bool canHaveSupermajority (const VoteGroups &votes, PeersNumberType all) const override
 
- Public Member Functions inherited from iroha::consensus::yac::SupermajorityChecker
virtual ~SupermajorityChecker ()=default
 

Additional Inherited Members

- Public Types inherited from iroha::consensus::yac::SupermajorityChecker
using VoteGroups = boost::any_range< PeersNumberType, boost::forward_traversal_tag, const PeersNumberType, std::ptrdiff_t >
 

Detailed Description

An implementation of BFT supermajority checker.

Member Function Documentation

bool iroha::consensus::yac::SupermajorityCheckerBft::canHaveSupermajority ( const VoteGroups votes,
PeersNumberType  all 
) const
overridevirtual

Check if supermajority is possible

Parameters
voted- numbers of peers voted for each option
all- number of peers in round
Returns
true, if reject

Implements iroha::consensus::yac::SupermajorityChecker.

Here is the call graph for this function:

bool iroha::consensus::yac::SupermajorityCheckerBft::hasSupermajority ( PeersNumberType  current,
PeersNumberType  all 
) const
overridevirtual

Check if supermajority is achieved

Parameters
currentactual number of signatures
allnumber of peers
Returns
true if supermajority is possible or false otherwise

Implements iroha::consensus::yac::SupermajorityChecker.

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: