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

#include "cleanup_strategy.hpp"

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

Public Types

using RoundsType = std::vector< Round >

Public Member Functions

virtual boost::optional< RoundsTypefinalize (Round round, Answer answer)=0
virtual bool shouldCreateRound (const Round &round)=0
virtual ~CleanupStrategy ()=default

Member Typedef Documentation

Collection of rounds type

Constructor & Destructor Documentation

virtual iroha::consensus::yac::CleanupStrategy::~CleanupStrategy ( )

Member Function Documentation

virtual boost::optional<RoundsType> iroha::consensus::yac::CleanupStrategy::finalize ( Round  round,
Answer  answer 
pure virtual

Notify strategy about new rounds

round- new round
answer- outcome of round
a collection of rounds for removing from the state

Implemented in iroha::consensus::yac::BufferedCleanupStrategy.

virtual bool iroha::consensus::yac::CleanupStrategy::shouldCreateRound ( const Round round)
pure virtual

The method checks whether we should add a new round

round- round for creation
true if round should be created

Implemented in iroha::consensus::yac::BufferedCleanupStrategy.

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