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

#include "mst_state.hpp"

Inheritance diagram for iroha::DefaultCompleter:
Inheritance graph
Collaboration diagram for iroha::DefaultCompleter:
Collaboration graph

Public Member Functions

 DefaultCompleter (std::chrono::minutes expiration_time)
 
bool isCompleted (const DataType &batch) const override
 
bool isExpired (const DataType &tx, const TimeType &current_time) const override
 
- Public Member Functions inherited from iroha::Completer
virtual ~Completer ()=default
 

Detailed Description

Class provides the default behavior for the batch completer. Complete, if all transactions have at least quorum number of signatures. Expired if at least one transaction is expired.

Constructor & Destructor Documentation

iroha::DefaultCompleter::DefaultCompleter ( std::chrono::minutes  expiration_time)
explicit

Creates new Completer with a given expiration time for transactions

Parameters
expiration_time- expiration time in minutes

Member Function Documentation

bool iroha::DefaultCompleter::isCompleted ( const DataType batch) const
overridevirtual

Verify that batch is completed

Parameters
batch- target object for verification
Returns
true, if complete

Implements iroha::Completer.

bool iroha::DefaultCompleter::isExpired ( const DataType batch,
const TimeType current_time 
) const
overridevirtual

Check whether the batch has expired

Parameters
batch- object for validation
current_time- current time
Returns
true, if the batch has expired

Implements iroha::Completer.


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