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

#include "mst_state.hpp"

Collaboration diagram for iroha::MstState:
Collaboration graph

Public Member Functions

StateUpdateResult operator+= (const DataType &rhs)
 
StateUpdateResult operator+= (const MstState &rhs)
 
MstState operator- (const MstState &rhs) const
 
bool isEmpty () const
 
bool operator== (const MstState &rhs) const
 
std::unordered_set< DataType, iroha::model::PointerBatchHasher, BatchHashEqualitygetBatches () const
 
MstState eraseByTime (const TimeType &time)
 
bool contains (const DataType &element) const
 

Static Public Member Functions

static MstState empty (const CompleterType &completer)
 

Member Function Documentation

bool iroha::MstState::contains ( const DataType element) const

Check, if this MST state contains that element

Parameters
elementto be checked
Returns
true, if state contains the element, false otherwise

Here is the caller graph for this function:

MstState iroha::MstState::empty ( const CompleterType completer)
static

Create empty state

Parameters
completer- strategy for determine completed and expired batches
Returns
empty mst state

Here is the caller graph for this function:

MstState iroha::MstState::eraseByTime ( const TimeType time)

Erase expired batches

Parameters
time- current time
Returns
state with expired batches

Here is the call graph for this function:

Here is the caller graph for this function:

std::unordered_set< DataType, iroha::model::PointerBatchHasher, BatchHashEquality > iroha::MstState::getBatches ( ) const
Returns
the batches from the state

Here is the caller graph for this function:

bool iroha::MstState::isEmpty ( ) const
Returns
true, if there is no batches inside

Here is the caller graph for this function:

StateUpdateResult iroha::MstState::operator+= ( const DataType rhs)

Add batch to current state

Parameters
rhs- batch for insertion
Returns
States with completed and updated batches

Here is the call graph for this function:

StateUpdateResult iroha::MstState::operator+= ( const MstState rhs)

Concat internal data of states

Parameters
rhs- object for merging
Returns
States with completed and updated batches

Here is the call graph for this function:

MstState iroha::MstState::operator- ( const MstState rhs) const

Operator provide difference between this and rhs operator

Parameters
rhs,statefor removing
Returns
State that provide difference between left and right states axiom operators: A V B == B V A A V B == B V (A \ B)

Here is the call graph for this function:

bool iroha::MstState::operator== ( const MstState rhs) const

Compares two different MstState's

Parameters
rhs- MstState to compare
Returns
true is rhs equal to this or false otherwise

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